[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_CHECK_LIB not finding my library
From: |
Joel J. Adamson |
Subject: |
Re: AC_CHECK_LIB not finding my library |
Date: |
Wed, 14 Apr 2010 13:33:39 -0400 |
>>>>> "Eric" == Eric Blake <address@hidden> writes:
> On 04/14/2010 10:50 AM, Joel J. Adamson wrote:
>> Hello,
>>
>> I have an auto-tooled library installed, and I'm building an
>> application with it. During the ./configure step, the test
>> specified by
>>
>> AC_CHECK_LIB([haploid], [rec_mating],,,[-lm])
>>
>> fails:
>>
>> checking for rec_mating in -lhaploid... no
> Does the corresponding config.log give you more insight into what
> was attempted, and why it might have failed?
Whoops --- I meant to check that before I wrote my message. It seems
I'm having some problems with OpenMP:
configure:3555: checking for rec_mating in -lhaploid
configure:3590: gcc -o conftest -g -O2 conftest.c -lhaploid -lm -lm >&5
/usr/lib/../lib/gcc/x86_64-redhat-linux/4.4.3/../../../libhaploid.so: undefined
reference to `GOMP_parallel_end'
/usr/lib/../lib/gcc/x86_64-redhat-linux/4.4.3/../../../libhaploid.so: undefined
reference to `omp_get_num_threads'
/usr/lib/../lib/gcc/x86_64-redhat-linux/4.4.3/../../../libhaploid.so: undefined
reference to `GOMP_parallel_start'
/usr/lib/../lib/gcc/x86_64-redhat-linux/4.4.3/../../../libhaploid.so: undefined
reference to `omp_get_thread_num'
collect2: ld returned 1 exit status
configure:3597: $? = 1
I reconfigured the library with
AC_CHECK_LIB([gomp], [omp_get_num_threads])
recompiled and then reinstalled the library. I added the same check to
configure.ac for the application and everything works now.
Thanks for the insanely quick response: can this go in the FAQ? I've
seen a few people talking about it on the web[1][2][3], and they didn't come up
with this solution (they nor I were smart enough to look in
config.log).
Thanks,
Joel
Footnotes:
[1] http://blog.flameeyes.eu/2008/04/29/i-consider-ac_check_lib-harmful
[2] http://www.keyongtech.com/4420100-ac_check_lib
[3] http://forums.freebsd.org/showthread.php?t=9706
--
Joel J. Adamson
Servedio Lab
University of North Carolina at Chapel Hill
FSF Member #8164
http://www.unc.edu/~adamsonj
pgpbC1s_BLEov.pgp
Description: PGP signature
- AC_CHECK_LIB not finding my library, Joel J. Adamson, 2010/04/14
- Re: AC_CHECK_LIB not finding my library, Eric Blake, 2010/04/14
- Re: AC_CHECK_LIB not finding my library,
Joel J. Adamson <=
- Re: AC_CHECK_LIB not finding my library, Eric Blake, 2010/04/14
- Re: AC_CHECK_LIB not finding my library, Joel J. Adamson, 2010/04/19
- Re: AC_CHECK_LIB not finding my library, Eric Blake, 2010/04/19
- Re: AC_CHECK_LIB not finding my library, Jim Meyering, 2010/04/20
- Re: AC_CHECK_LIB not finding my library, Eric Blake, 2010/04/20