Installation Problems on Mac OS X (undefined GMP symbols)

Bug #159235 reported by Tom Gordon
6
Affects Status Importance Assigned to Milestone
Ikarus Scheme
Fix Released
Medium
Abdulaziz Ghuloum

Bug Description

uname -a shows:

Darwin i ... 8.10.3 Darwin Kernel Version 8.10.3: Wed Jun 27 23:29:36 PDT 2007; root:xnu-792.23.3~1/RELEASE_I386 i386 i386

I first installed and tested gmp-4.2.2. The header file and libraries were installed in /usr/local. I copied them to /usr/include and /usr/lib, respectively.

After running ./configure and make in the Ikarus build directory, I get this linking error:

gcc -g -O2 -DNDEBUG -O3 -dynamic -o ikarus ikarus-collect.o ikarus-exec.o ikarus-fasl.o ikarus-flonums.o ikarus-main.o ikarus-numerics.o ikarus-print.o ikarus-runtime.o ikarus-symbol-table.o ikarus-verify-integrity.o ikarus-weak-pairs.o ikarus-winmmap.o ikarus-enter.o -lgmp
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:
___gmp_bits_per_limb
___gmpn_add_n
___gmpn_divrem_1
___gmpn_get_str
___gmpn_mul
___gmpn_mul_1
___gmpn_sub_n
___gmpn_tdiv_qr
collect2: ld returned 1 exit status
make[2]: *** [ikarus] Error 1
make[1]: *** [all-recursive] Error 1

Revision history for this message
Jens Axel Søgaard (soegaard) wrote :

I ran into the exact same problem.

I downloaded the GMP source and compiled it with default options.
This produces a 64 bit libgmp, which doesn't work with Ikarus.
When you run configure for GMP set ABI to 32 bits.

(Thanks to my brother for figuring his out)

Revision history for this message
Tom Gordon (tom-gordon) wrote : Re: [Bug 159235] Re: Installation Problems on Mac OS X (undefined GMP symbols)

Dear Jens,

Many thanks! Just what the doctored ordered. Ikarus is running fine
now.

Are you considering porting your galore library of data structures to
R6RS scheme? I'd like to port the application I'm developing in PLT
Scheme to R6RS before it is made public (a rule-based reasoner and
argumentation system), but this application depends on a number of
PLT extensions, including your galore library.

Yours,

Tom Gordon

On 01.11.2007, at 12:35, Jens Axel Søgaard wrote:

> I ran into the exact same problem.
>
> I downloaded the GMP source and compiled it with default options.
> This produces a 64 bit libgmp, which doesn't work with Ikarus.
> When you run configure for GMP set ABI to 32 bits.
>
> (Thanks to my brother for figuring his out)
>
> --
> Installation Problems on Mac OS X (undefined GMP symbols)
> https://bugs.launchpad.net/bugs/159235
> You received this bug notification because you are a direct subscriber
> of the bug.

Revision history for this message
Jens Axel Søgaard (soegaard) wrote : Re: [Bug 159235] Re: Installation Problems on Mac OS X (undefined GMP symbols)

Hi Tom,

> Many thanks! Just what the doctored ordered. Ikarus is running fine
> now.

Good to hear.

> Are you considering porting your galore library of data structures to
> R6RS scheme? I'd like to port the application I'm developing in PLT
> Scheme to R6RS before it is made public (a rule-based reasoner and
> argumentation system), but this application depends on a number of
> PLT extensions, including your galore library.

Maybe someday. But do feel free to port what you need to R6RS.
Version 2 of Galore ought to be relatively easy to port.

/Jens Axel

Revision history for this message
Jens Axel Søgaard (soegaard) wrote :

>> I ran into the exact same problem.
>>
>> I downloaded the GMP source and compiled it with default options.
>> This produces a 64 bit libgmp, which doesn't work with Ikarus.
>> When you run configure for GMP set ABI to 32 bits.
>>
>> (Thanks to my brother for figuring his out)

Aziz,

The reascon it was a little tricky to figure out, was that
configure reported that GMP was present and that it worked.
If configure tests the same version of libgmp that actually
gets linked, it will be possible to warn the user early.

/Jens Axel

Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote :

On Nov 1, 2007, at 11:16 AM, Jens Axel Søgaard wrote:

> Aziz,
>
> The reascon it was a little tricky to figure out, was that
> configure reported that GMP was present and that it worked.
> If configure tests the same version of libgmp that actually
> gets linked, it will be possible to warn the user early.

Thanks Jens for your help.

I will try to see how to get autoconf to do that. In the
meanwhile, I will post your workaround to the Answers page.

Thanks again.

Aziz,,,

Changed in ikarus:
assignee: nobody → aghuloum
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote :

I have added a patch for checking for the undefined symbols in configure.ac (revision 1004).
Would someone check whether it works or breaks on their machines?

Changed in ikarus:
status: Confirmed → In Progress
Revision history for this message
Jens Axel Søgaard (soegaard) wrote :
Download full text (5.1 KiB)

Abdulaziz Ghuloum skrev:
> I have added a patch for checking for the undefined symbols in configure.ac (revision 1004).
> Would someone check whether it works or breaks on their machines?
>
>
> ** Changed in: ikarus
> Status: Confirmed => In Progress

I fetched the development version with:

   bzr checkout http://www.cs.indiana.edu/~aghuloum/ikarus.dev

Then ran ./configure which gave this error in the end:

   config.status: error: cannot find input file: scheme/Makefile.in

The entire output from ./configure is below.

The machine runs OS X 10.4.

/Jens Axel

80:~/Scheme/Ikarus/dev/ikarus.dev soegaard$ cat output-of-configure.txt
checking build system type... i686-apple-darwin8.10.2
checking host system type... i686-apple-darwin8.10.2
checking target system type... i686-apple-darwin8.10.2
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking dependency style of gcc... gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for library containing dlsym... none required
checking for library containing cos... none required
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking gmp.h usability... yes
checking gmp.h presence... yes
checking for gmp.h... yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
che...

Read more...

Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote :

The line I was looking for was:
  checking for __gmpn_mul in -lgmp... yes

I also added missing scheme/Makefile.in and doc/Makefile.in. You might want to "touch" the pdf file in doc/ if you don't want to rebuild the docs since, apparently, bzr does not retain file access/update time stamps.

Thanks Jens.

Revision history for this message
Jens Axel Søgaard (soegaard) wrote :

Jens Axel Søgaard skrev:
> Abdulaziz Ghuloum skrev:
>> I have added a patch for checking for the undefined symbols in configure.ac (revision 1004).
>> Would someone check whether it works or breaks on their machines?
>>
>>
>> ** Changed in: ikarus
>> Status: Confirmed => In Progress
>
> I fetched the development version with:
>
> bzr checkout http://www.cs.indiana.edu/~aghuloum/ikarus.dev
>
> Then ran ./configure which gave this error in the end:
>
> config.status: error: cannot find input file: scheme/Makefile.in
>
> The entire output from ./configure is below.

After a little digging I found out that my automake was version 1.6.
After an upgrade to version 1.10 the build succeeded.

/Jens Axel

Revision history for this message
Jens Axel Søgaard (soegaard) wrote :

Abdulaziz Ghuloum skrev:
> The line I was looking for was:
> checking for __gmpn_mul in -lgmp... yes
>
> I also added missing scheme/Makefile.in and doc/Makefile.in. You might
> want to "touch" the pdf file in doc/ if you don't want to rebuild the
> docs since, apparently, bzr does not retain file access/update time
> stamps.

Ah, so that's why it worked the second time around ;-)

/Jens Axel

Changed in ikarus:
status: In Progress → Fix Committed
Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote :

This bug report is about to be closed as the fix comitted previously
will be incorporated in the next 0.0.2 release of Ikarus Scheme,
scheduled for November 28, 2007.
A release candidate tarball is available for download from:
  http://www.cs.indiana.edu/~aghuloum/ikarus/ikarus-0.0.2-rc1.tar.gz
Please do test it if you have the time and report any issues you
might encounter. Thank you very much for your support. Aziz,,,
(Sorry for the duplicates; I'm updating every open bug.)

Changed in ikarus:
milestone: none → 0.0.2
Revision history for this message
Tom Gordon (tom-gordon) wrote : Re: [Bug 159235] Re: Installation Problems on Mac OS X (undefined GMP symbols)

OK. Thanks for providing me access to the release candidate. I'll
be happy to try it out next week and report any problems I find.
Will there be a list of changes since the last version?

Yours,

Tom Gordon

On Nov 24, 2007, at 11:11 AM, Abdulaziz Ghuloum wrote:

> This bug report is about to be closed as the fix comitted previously
> will be incorporated in the next 0.0.2 release of Ikarus Scheme,
> scheduled for November 28, 2007.
> A release candidate tarball is available for download from:
> http://www.cs.indiana.edu/~aghuloum/ikarus/ikarus-0.0.2-rc1.tar.gz
> Please do test it if you have the time and report any issues you
> might encounter. Thank you very much for your support. Aziz,,,
> (Sorry for the duplicates; I'm updating every open bug.)
>
> ** Changed in: ikarus
> Target: None => 0.0.2
>
> --
> Installation Problems on Mac OS X (undefined GMP symbols)
> https://bugs.launchpad.net/bugs/159235
> You received this bug notification because you are a direct subscriber
> of the bug.

Revision history for this message
Jens Axel Søgaard (soegaard) wrote : Re: [Bug 159235] Re: Installation Problems on Mac OS X (undefined GMP symbols)

Abdulaziz Ghuloum wrote:

> A release candidate tarball is available for download from:
> http://www.cs.indiana.edu/~aghuloum/ikarus/ikarus-0.0.2-rc1.tar.gz
> Please do test it if you have the time and report any issues you
> might encounter.

Everything went smoothly here.

/Jens Axel

Changed in ikarus:
status: Fix Committed → Fix Released
Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote : Re: [Bug 159235] Re: Installation Problems on Mac OS X (undefined GMP symbols)

On Nov 24, 2007, at 6:13 AM, Tom Gordon wrote:

> Will there be a list of changes since the last version?

The list of changes is huge :-) The milestone page lists
the (reported) bugs that were targeted.
    https://launchpad.net/ikarus/+milestone/0.0.2

I really can't afford documenting the changes separately.
The log file (e.g. bzr help log) should list it all.

Aziz,,,

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.