[Top][All Lists]

[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/../../../ undefined 
reference to `GOMP_parallel_end'
/usr/lib/../lib/gcc/x86_64-redhat-linux/4.4.3/../../../ undefined 
reference to `omp_get_num_threads'
/usr/lib/../lib/gcc/x86_64-redhat-linux/4.4.3/../../../ undefined 
reference to `GOMP_parallel_start'
/usr/lib/../lib/gcc/x86_64-redhat-linux/4.4.3/../../../ 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 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






Joel J. Adamson
Servedio Lab
University of North Carolina at Chapel Hill

FSF Member #8164

Attachment: pgpbC1s_BLEov.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]