Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#50129 closed defect (worksforme)

ghc @7.8.3_4 build failure: Missing C library: ncursesw

Reported by: alexmptrac@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc:
Port: ghc

Description (last modified by ryandesign (Ryan Carsten Schmidt))

MacOS version: 10.7.5
XCode version: 4.6.3

The error message in the log is a bit weird because I do in fact have ncurses installed:

$ sudo port installed ncurses
The following ports are currently installed:
  ncurses @5.9_2
  ncurses @5.9_2+universal
  ncurses @6.0_0
  ncurses @6.0_0+universal (active)
$ ls -l /opt/local/lib/libncurses*
-rwxr-xr-x  1 root  admin   152380 12 Sep 08:55 /opt/local/lib/libncurses++.6.dylib
-rw-r--r--  1 root  admin   214032 12 Sep 08:55 /opt/local/lib/libncurses++.a
lrwxr-xr-x  1 root  admin       20 12 Sep 08:55 /opt/local/lib/libncurses++.dylib -> libncurses++.6.dylib
lrwxr-xr-x  1 root  admin       20 12 Sep 08:55 /opt/local/lib/libncurses++w.6.dylib -> libncurses++.6.dylib
lrwxr-xr-x  1 root  admin       14 12 Sep 08:55 /opt/local/lib/libncurses++w.a -> libncurses++.a
lrwxr-xr-x  1 root  admin       20 12 Sep 08:55 /opt/local/lib/libncurses++w.dylib -> libncurses++.6.dylib
-rwxr-xr-x  1 root  admin   625468 12 Sep 08:55 /opt/local/lib/libncurses.6.dylib
-rw-r--r--  1 root  admin  1041448 12 Sep 08:55 /opt/local/lib/libncurses.a
lrwxr-xr-x  1 root  admin       18 12 Sep 08:55 /opt/local/lib/libncurses.dylib -> libncurses.6.dylib
lrwxr-xr-x  1 root  admin       18 12 Sep 08:55 /opt/local/lib/libncursesw.6.dylib -> libncurses.6.dylib
lrwxr-xr-x  1 root  admin       12 12 Sep 08:55 /opt/local/lib/libncursesw.a -> libncurses.a
lrwxr-xr-x  1 root  admin       18 12 Sep 08:55 /opt/local/lib/libncursesw.dylib -> libncurses.6.dylib

Attachments (2)

main.log (112.9 KB) - added by alexmptrac@… 9 years ago.
main.2.log (4.3 MB) - added by alexmptrac@… 9 years ago.

Change History (12)

Changed 9 years ago by alexmptrac@…

Attachment: main.log added

comment:1 Changed 9 years ago by alexmptrac@…

Cc: alexmptrac@… added

Cc Me!

comment:2 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: alexmptrac@… removed
Description: modified (diff)

comment:3 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

I'm a little confused by the line in the log that says:

:info:build configure: loading site script /usr/local/share/config.site

Does this file exist? If so what does it contain?

comment:4 in reply to:  3 ; Changed 9 years ago by alexmptrac@…

Replying to ryandesign@…:

I'm a little confused by the line in the log that says:

:info:build configure: loading site script /usr/local/share/config.site

Does this file exist? If so what does it contain?

Oh, well spotted. That was indeed causing the ncurses problem. I didn't think Macports would see it because it was under /usr rather than /opt. (It was actually a workaround for a problem I ran into a few months ago when compiling something that isn't in Macports.)

I have removed the offending /usr/local/share/config.site file and done a 'sudo port clean ghc' and 'sudo port install ghc' and the build gets much further, but eventually dies with a linker error. I will attach the new log file.

Changed 9 years ago by alexmptrac@…

Attachment: main.2.log added

comment:5 Changed 9 years ago by neverpanic (Clemens Lang)

That's a weird error message - it seems like there is a problem internal to GHC's build process, because it fails to find a file that GHC itself should have produced (from what I understand).

Can you try again using sudo port install ghc -- build.jobs=1 to rule out any race conditions?

comment:6 in reply to:  4 ; Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to alexmptrac@…:

Oh, well spotted. That was indeed causing the ncurses problem. I didn't think Macports would see it because it was under /usr rather than /opt. (It was actually a workaround for a problem I ran into a few months ago when compiling something that isn't in Macports.)

Unfortunately, files in /usr/local do interfere with MacPorts; see wiki:FAQ#usrlocal.

comment:7 in reply to:  5 ; Changed 9 years ago by alexmptrac@…

Replying to cal@…:

That's a weird error message - it seems like there is a problem internal to GHC's build process, because it fails to find a file that GHC itself should have produced (from what I understand).

Can you try again using sudo port install ghc -- build.jobs=1 to rule out any race conditions?

The build ran for a long time then died with a different bizarre error. At this point I started to suspect I might be running out of memory, so I quit everything except Terminal and tried again. After about an hour and a half it succeeded!

Thanks a lot for your help.

comment:8 in reply to:  6 Changed 9 years ago by alexmptrac@…

Replying to ryandesign@…:

Replying to alexmptrac@…:

Oh, well spotted. That was indeed causing the ncurses problem. I didn't think Macports would see it because it was under /usr rather than /opt. (It was actually a workaround for a problem I ran into a few months ago when compiling something that isn't in Macports.)

Unfortunately, files in /usr/local do interfere with MacPorts; see wiki:FAQ#usrlocal.

Ah, I see. It sounds like it might be time for me to learn how to create a port; that would probably have solved my problem in a cleaner way.

comment:9 in reply to:  7 Changed 9 years ago by neverpanic (Clemens Lang)

Resolution: worksforme
Status: newclosed

Replying to alexmptrac@…:

The build ran for a long time then died with a different bizarre error. At this point I started to suspect I might be running out of memory, so I quit everything except Terminal and tried again. After about an hour and a half it succeeded!

Oh, OK, yeah, that would explain why it happened earlier when you were using parallel building. Unfortunately, there's probably very little we can do about this. GHC is just a large software package. Fortunately, the situation should improve as soon as we have a buildbot for El Capitan, because pre-built binaries will be available for GHC then.

I'll close this as worksforme, because I'm not sure what I should do about this.

comment:10 Changed 9 years ago by alexmptrac@…

Yes, I think that's the right thing to do. Thanks!

Note: See TracTickets for help on using tickets.