Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#19946 closed defect (duplicate)

ghc 6.10.3 fails to build on Intel OS X 10.4.11 during config

Reported by: florin.bocaneala@… Owned by: gwright@…
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port: ghc

Description

--->  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.10.3" && ./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 --datadir=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/destroot/opt/local/share/ghc-6.10.3 --with-gmp-includes=/opt/local/include --with-gmp-libraries=/opt/local/lib --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 1
Command output: checking build system type... i386-apple-darwin8.11.1
checking host system type... i386-apple-darwin8.11.1
checking target system type... i386-apple-darwin8.11.1
Canonicalised to: i386-apple-darwin
checking version of ghc... ./configure: line 2243: 14134 Trace/BPT trap          "${WithGhc-ghc}" --version >conftestghc 2>&1
unknown
./configure: line 2240: test: unknownunknown: integer expression expected
./configure: line 2241: test: unknownunknown: integer expression expected
./configure: line 2242: test: unknownunknown: integer expression expected
checking for nhc... no
checking for nhc98... no
checking for hbc... no
checking for ld... /usr/bin/ld
./configure: line 2642: test: unknown: integer expression expected
checking for path to top of build tree... dyld: Library not loaded: /opt/local/lib/libgmp.3.dylib
  Referenced from: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-bootstrap/lib/ghc-6.10.1/ghc
  Reason: no suitable image found.  Did find:
        /opt/local/lib/libgmp.3.dylib: mach-o, but wrong architecture
        /opt/local/lib/libgmp.3.dylib: mach-o, but wrong architecture
./configure: line 2662: 14156 Trace/BPT trap          $WithGhc -v0 --make pwd -o pwd
./configure: line 1: utils/pwd/pwd: No such file or directory
configure: error: cannot determine current directory

Error: Status 1 encountered during processing.

Despite the error message above, gmp was installed without any error and it seems to be built for i386.

Attachments (2)

gmp.txt (2.3 KB) - added by florin.bocaneala@… 15 years ago.
port -d install gmp output
ghc.txt (12.5 KB) - added by florin.bocaneala@… 15 years ago.
port -d install ghc

Download all attachments as: .zip

Change History (14)

comment:1 Changed 15 years ago by mf2k (Frank Schima)

Owner: changed from macports-tickets@… to gwright@…
Port: 6.10.3 removed

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

Cc: ryandesign@… added

Which computer and OS do you have? The configure script says "i386-apple-darwin8.11.1" so it thinks you have an Intel Mac with Mac OS X 10.4.11. Is that correct?

It says /opt/local/lib/libgmp.3.dylib is the wrong architecture. What architecture is it? The "file" command should tell you. On my Intel Mac with 10.4 I have:

$ file /opt/local/lib/libgmp.3.dylib
/opt/local/lib/libgmp.3.dylib: symbolic link to `libgmp.3.5.0.dylib'
$ file /opt/local/lib/libgmp.3.5.0.dylib
/opt/local/lib/libgmp.3.5.0.dylib: Mach-O dynamically linked shared library i386

Could you also show the output of

port installed gmp

and let us know if you are selecting any variants when installing ghc.

comment:3 in reply to:  2 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign@…:

Which computer and OS do you have? The configure script says "i386-apple-darwin8.11.1" so it thinks you have an Intel Mac with Mac OS X 10.4.11. Is that correct?

Sorry, I overlooked you already confirmed this in the summary of this ticket.

comment:4 in reply to:  2 Changed 15 years ago by florin.bocaneala@…

Replying to ryandesign@…:

Which computer and OS do you have? The configure script says "i386-apple-darwin8.11.1" so it thinks you have an Intel Mac with Mac OS X 10.4.11. Is that correct?

It says /opt/local/lib/libgmp.3.dylib is the wrong architecture. What architecture is it? The "file" command should tell you. On my Intel Mac with 10.4 I have:

$ file /opt/local/lib/libgmp.3.dylib
/opt/local/lib/libgmp.3.dylib: symbolic link to `libgmp.3.5.0.dylib'
$ file /opt/local/lib/libgmp.3.5.0.dylib
/opt/local/lib/libgmp.3.5.0.dylib: Mach-O dynamically linked shared library i386

Could you also show the output of

port installed gmp

and let us know if you are selecting any variants when installing ghc.

Thanks for looking into this. I include my responses to your questions below:

$ file libgmp.3.5.0.dylib 
libgmp.3.5.0.dylib: Mach-O dynamically linked shared library i386
$ port installed gmp
The following ports are currently installed:
  gmp @4.3.1_0 (active)

I did not select any variants when attempting to install ghc.

comment:5 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Ok, that's fine. But this is not right:

checking for path to top of build tree... dyld: Library not loaded: /opt/local/lib/libgmp.3.dylib
  Referenced from: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-bootstrap/lib/ghc-6.10.1/ghc

It's trying to use ghc 6.10.1 as the bootstrap version. But according to the portfile, that version is only used on powerpc. So somehow the +darwin_8_powerpc or +darwin_9_powerpc variant is getting selected. So that's why the ghc bootstrap you have is for PowerPC, which is why it's complaining that it can't use the Intel libgmp.

Try getting the full debug output, like this:

sudo port clean gmp
sudo port -d install gmp 2>&1 | tee ~/Desktop/gmp.txt

If it still fails, you can attach gmp.txt from your desktop to this ticket to give us more data.

Changed 15 years ago by florin.bocaneala@…

Attachment: gmp.txt added

port -d install gmp output

comment:6 Changed 15 years ago by florin.bocaneala@…

So should I understand macports does not support libgmp for intel? Then why does the library file appears to be built for i386?

I attached the output as instructed. Thanks.

comment:7 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

I'm sorry, my brain was elsewhere. I meant:

sudo port clean ghc
sudo port -d install ghc 2>&1 | tee ~/Desktop/ghc.txt

comment:8 Changed 15 years ago by florin.bocaneala@…

I guess we made a little progress.

I attach below the debug output that you requested, but then, based on your suggestion, I tried specifying the architecture by hand (+darwin_8_i386) and this time it managed to pass the configuration step, and even most of the compilation. However, it faltered once again during linking with... libgmp.

Preprocessing library ghc-6.10.3...
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: can't locate file for: -lgmp
collect2: ld returned 1 exit status
linking dist-stage1/build/Fingerprint_hsc_make.o failed
command was: /usr/bin/gcc -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-bootstrap/lib/ghc-6.6 -lHSunix_cbits -ldl -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-6.10.3/libraries/hpc/dist-bootstrapping/build -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-bootstrap/lib/ghc-6.6 -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-6.10.3/libraries/extensible-exceptions/dist-bootstrapping/build -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-6.10.3/libraries/Cabal/dist-bootstrapping/build -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-6.10.3/libraries/filepath/dist-bootstrapping/build -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-bootstrap/lib/ghc-6.6 -lHSbase_cbits -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-bootstrap/lib/ghc-6.6 -lm -lgmp -ldl dist-stage1/build/Fingerprint_hsc_make.o -o dist-stage1/build/Fingerprint_hsc_make
make[1]: *** [boot.stage.1] Error 1
make: *** [stage1] Error 1

Warning: the following items did not execute (for ghc): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Error: Status 1 encountered during processing.

Let me know if you need the whole debug output for building ghc with manually selected variant.

Changed 15 years ago by florin.bocaneala@…

Attachment: ghc.txt added

port -d install ghc

comment:9 in reply to:  8 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to florin.bocaneala@…:

I guess we made a little progress.

I attach below the debug output that you requested,

In the output, the line

DEBUG: Executing variant darwin_8_powerpc provides darwin_8_powerpc

means that the variant darwin_8_powerpc was selected. If you didn't request it in your "port install" command, is it perhaps listed in your /opt/local/etc/macports/variants.conf?

If you look at the other ports you have installed, are any of them using a powerpc variant too? Try

port installed | grep powerpc

to see.

but then, based on your suggestion, I tried specifying the architecture by hand (+darwin_8_i386) and this time it managed to pass the configuration step, and even most of the compilation. However, it faltered once again during linking with... libgmp.

That's bug #19747.

comment:10 Changed 15 years ago by florin.bocaneala@…

For what is worth, variants.conf contains no variants (only some comments), and there are no installed ports on my system using any powerpc variant.

comment:11 Changed 15 years ago by gwright@…

Resolution: duplicate
Status: newclosed

Duplicate of #19747.

comment:12 Changed 15 years ago by florin.bocaneala@…

Just to confirm it: the new variant (cabal_configure_debug) fixed it although I still had to select darwin_8_i386 manually.

Note: See TracTickets for help on using tickets.