bug-gnulib
[Top][All Lists]
Advanced

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

Re: Module dependency problems ?


From: Bruno Haible
Subject: Re: Module dependency problems ?
Date: Wed, 14 Feb 2018 22:44:06 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-104-generic; KDE/5.18.0; x86_64; ; )

Hi Tim,

> I see these linker warnings:
> 
> undefined reference to `rpl_fclose'
> undefined reference to `rpl_nanosleep'
> 
> and I don't see what's wrong, looks like I need some help.
> 
> From the extra/Makefile:
> # Reproduce by: gnulib-tool --import --local-dir=extra/override --
> lib=libextra --source-base=extra --m4-base=extra/m4 --
> doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-
> dependencies --libtool --macro-prefix=extra c-ctype
>  c-strcase c-strcasestr cond dirname gettext-h gettime limits-h
> nanosleep sockets thread
> 
> I am using libtool for creating a libextra.la, if that matters.
> 
> After 'make', in extra/ there is no nanosleep.[l]o, just the .c file.

Sorry, but that's too little information to even begin an analysis.

Typically you debug it like this, from two ends:
A.
  1. Determine, by looking at the configure output and the gnulib documentation
     and the corresponding .m4 file, whether a gnulib override of fclose() is
     meant to be provided by gnulib.
  2. Look at the values of the AC_SUBSTed variables HAVE_FCLOSE, REPLACE_FCLOSE
     etc. in config.status. (I hope you have only one config.status!)

B.
  1. Find out the .o file which is containing the undefined reference
     to rpl_fclose.
  2. Use 'nm' to get an overview of the symbols required and provided by this
     object file.
  3. Compile its source with "gcc -E" to see the preprocessed source code and
     with "gcc -E -dM | sort" to see the macros in effect.

And similarly for rpl_nanosleep.

Bruno




reply via email to

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