Opened 17 years ago

Closed 17 years ago

#12269 closed defect (worksforme)

Cannot build ghc 6.6.1

Reported by: kordova@… Owned by: sfiera@…
Priority: Normal Milestone:
Component: ports Version: 1.4.40
Keywords: Cc: kordova@…,sfiera@…
Port:

Description

I am unable to build ghc 6.6.1 as a dependency for darcs 1.0.9

$ sudo port install ghc
--->  Fetching ghc
--->  Verifying checksum(s) for ghc
--->  Extracting ghc
--->  Applying patches to ghc
--->  Configuring ghc
Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-6.6.1" && ./configure --prefix=/opt/local --prefix=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/destroot//opt/local --mandir=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/destroot//opt/local/share/man/ --with-readline-includes=/opt/local/include --with-readline-libraries=/opt/local/lib --disable-openal --disable-alut --with-ghc='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-bootstrap/bin/ghc' " returned error 77
Command output: checking build system type... i686-apple-darwin8.10.1
checking host system type... i686-apple-darwin8.10.1
checking target system type... i686-apple-darwin8.10.1
Canonicalised to: i386-apple-darwin
checking for path to top of build tree... /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-6.6.1
checking version of ghc... 6.6
checking for ghc-pkg matching /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-bootstrap/bin/ghc... no
checking for ghc-pkg... no
checking whether ghc has readline package... no
checking for nhc... no
checking for nhc98... no
checking for hbc... no
checking whether #! works in shell scripts... yes
checking for perl... /opt/local/bin/perl
checking if your perl works in shell scripts... yes
checking for python... /usr/bin/python
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.

Error: Status 1 encountered during processing.

Attachments (1)

config.log (10.5 KB) - added by kordova@… 17 years ago.
config.log reference in error messages

Download all attachments as: .zip

Change History (8)

Changed 17 years ago by kordova@…

Attachment: config.log added

config.log reference in error messages

comment:1 Changed 17 years ago by sfiera@…

Cc: kordova@… sfiera@… added

Did you install the Xcode tools? Did you disable anything when doing so with "custom install"? This error implies that part of gcc was not installed with the rest of it.

comment:2 Changed 17 years ago by kordova@…

I have Xcode installed. I do not believe that I disabled anything but I do not have the install disc available to me for at least a few days and I am unsure of how else to determine if something was not installed. I have had no issue installing these other ports:

  apr @1.2.8_0 (active)
  apr-util @1.2.8_2 (active)
  bash-completion @20060301_0 (active)
  cmake @2.4.6_0 (active)
  curl @7.16.2_0+darwin_8 (active)
  db44 @4.4.20_1+darwin_8 (active)
  expat @2.0.0_2 (active)
  gettext @0.16.1_0 (active)
  glib2 @2.12.12_0 (active)
  gmp @4.2.1_4+test (active)
  irssi @0.8.10a_2 (active)
  keychain @2.6.8_0 (active)
  libiconv @1.11_4+darwin_8 (active)
  ncurses @5.6_0+darwin_8 (active)
  ncursesw @5.6_0+darwin_8 (active)
  neon @0.26.3_0 (active)
  openssl @0.9.8e_0+darwin_8 (active)
  perl5.8 @5.8.8_0+darwin_8 (active)
  pkgconfig @0.21_0 (active)
  readline @5.2.001_0 (active)
  screen @4.0.3_0 (active)
  sqlite3 @3.3.17_0+darwin_8 (active)
  subversion @1.4.3_1 (active)
  wget @1.10.2_0+darwin_8 (active)
  zlib @1.2.3_1 (active)

Is it likely that I could install these without the component that may be missing here?

comment:3 Changed 17 years ago by sfiera@…

Owner: changed from macports-dev@… to sfiera@…
Status: newassigned

Hmm, now that I read more closely, it's reporting the absence of /usr/i686-apple-darwin8/lib/libgcc_s.1.dylib, which properly shouldn't exist; it's at /usr/lib/libgcc_s.1.dylib. Here are a few commands that might help to diagnose the problem, along with their output on my system:

otool -L /usr/bin/gcc

/usr/bin/gcc:
        /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.3)

echo $DYLD_LIBRARY_PATH

echo $DYLD_FALLBACK_LIBRARY_PATH

/opt/local/lib

comment:4 Changed 17 years ago by kordova@…

Very interesting. I had noticed the /usr/i686... and was not sure about it other than that it did not exist on my system. It also pops up in your commands:

otool -L /usr/bin/gcc

/usr/bin/gcc:
        /usr/i686-apple-darwin8/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.3)

echo $DYLD_LIBRARY_PATH

echo $DYLD_FALLBACK_LIBRARY_PATH

If these two issues are the problem, is there a way to correct the first without the cds on hand? Mine are out of state and inaccessible to me for at least a week and a half...

Thanks for your help in narrowing this down. :)

comment:5 Changed 17 years ago by sfiera@…

I don't know of any way to fix gcc without reinstalling. You could download Xcode from Apple, but it's about a 1GB download. However, it's strange that the problem should come up now, since this should have prevented you from installing many of those earlier ports.

You could also check if /usr/bin/i686-apple-darwin8-gcc-4.0.1 is linked correctly, and if so, replace /usr/bin/gcc with a symbolic link to it using sudo ln -sf i686-apple-darwin8-gcc-4.0.1 /usr/bin/gcc. That should be safely reversible by running sudo gcc_select 3.3; sudo gcc_select 4.0 since /usr/bin/gcc is already a symlink to one of those versions.

N.B. I haven't tried building anything with that configuration, and don't know what the difference between the two gcc's is (maybe it can't produce universal binaries?), so don't be surprised if it doesn't work

comment:6 Changed 17 years ago by kordova@…

Ok, I reinstalled Xcode 2.4.1. That corrects my issues as far as I can tell (ghc can take hours to compile and it is presently chugging along happily).

Thanks a lot for helping me with this. I have no idea how it became broken.

comment:7 Changed 17 years ago by sfiera@…

Resolution: worksforme
Status: assignedclosed

Glad to hear it's working.

Note: See TracTickets for help on using tickets.