Re: configure can't find library on some platforms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Zac,

* Zac Hansen wrote on Tue, Jul 04, 2006 at 01:37:16AM CEST:
> 
> I build mylib1 and do a make install.  Then, I do a configure in mylib2 and
> on some platforms it can't find main in mylib1.

Try
  ./configure LDFLAGS=-L/usr/local/lib

> Platforms that work:
> FC4, OS X 10.4
> 
> Platforms that don't work:
> RHEL3, MSYS, CYGWIN

Look in the file config.log where the error happens: it has the exact
error message.

> Right now I'm trying to make it work on RHEL3.  mylib1 was put in
> /usr/local/lib.  I added /usr/local/lib/to /etc/ld.so.conf and ran "sudo
> ldconfig -v" and verified that it saw my library (I've also rebooted).

ld.so.conf is only for the runtime linker (ld.so), not for the link
editor (ld).

> Also, if I type gcc -lmylib1 it sees it (gcc -lblahblahlibrary gives an
> error about blahblahlibrary not found, and that's not what gcc -lmylib1
> errors with).

Hmm.  This is weird.  Again, the error in config.log will tell you more.
(Post the section if you need help with it.)

> Basically, mylib2's configure.ac is pretty straightforward with:
> 
> AC_CHEC_LIB(mylib2, main, , AC_MSG_ERROR(mylib2 required))

This line is missing quoting.  It should at least be
  AC_CHEC_LIB(mylib2, main, , [AC_MSG_ERROR(mylib2 required)])

but preferably you should write
  AC_CHEC_LIB([mylib2], [main], [], [AC_MSG_ERROR([mylib2 required])])

for consistency.  See the manual at
http://www.gnu.org/software/autoconf/manual/html_node/Autoconf-Language.html
http://www.gnu.org/software/autoconf/manual/html_node/M4-Quotation.html
(these links will start to work sometime tonight  ;-)

Cheers,
Ralf


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux