This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix "make check" failure to build on Ubuntu 14.04 LTS


On Mon, Jan 18, 2016 at 1:13 PM, Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:

> Is this tied to an specific make/binutils/gcc version that only shows itself
> on Ubuntu 14.04?

That seems likely, as nobody else appears to be affected (or this
would have probably been fixed many months ago).

For the record:
gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
GNU ld (GNU Binutils for Ubuntu) 2.24 (2.24-5ubuntu14)

My understanding is that the order of shared libraries on command line
shouldn't matter, but somehow does in this particular configuration.

This is trivially reproduced with:

echo "int foo() { return 0; }" | gcc -fPIC -shared -o foo.so -xc -
cat > t.c <<EOF
int main() { return foo(); }
EOF

gcc t.c ./foo.so
# success

gcc ./foo.so t.c
/tmp/ccKY0qMa.o: In function `main':
t.c:(.text+0xa): undefined reference to `foo'
collect2: error: ld returned 1 exit status



-- 
Paul Pluzhnikov


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]