probllems with ltdl versions and building newer versions

Linda A. Walsh gcc@tlinx.org
Mon Aug 17 23:04:00 GMT 2015


I've been using -flto with most of my builds without problems.

Then I got to squid-3.5.7 which had its own and I tried to use.

It didn't play well with what I had installed, (at link time
many things were 'unresolved'), so I tried to use the ltdl included
with squid.

Now my "other builds" no longer work with messages along the lines
of a 2.2 vs. 3.0 version incompat.

Looked up source for lto and found gnu page 
https://gcc.gnu.org/wiki/LinkTimeOptimization
...followed instructions there and a few variations ...
nothing would generate lto or any installable.

Error messages center around some struct sizes:
  /usr/bin/gcc -c -DHAVE_CONFIG_H -g -fkeep-inline-functions  -I. 
-I../../lto/libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat 
-Wstrict-prototypes -pedantic  -fpic ../../lto/libiberty/physmem.c -o 
pic/physmem.o; \
else true; fi
../../lto/libiberty/physmem.c: In function 'physmem_total':
../../lto/libiberty/physmem.c:96:23: error: storage size of 'pss' isn't 
known
     struct pst_static pss;
                       ^
../../lto/libiberty/physmem.c:97:5: warning: implicit declaration of 
function 'pstat_getstatic' [-Wimplicit-function-declaration]
     if (0 <= pstat_getstatic (&pss, sizeof pss, 1, 0))
     ^
../../lto/libiberty/physmem.c:96:23: warning: unused variable 'pss' 
[-Wunused-variable]
     struct pst_static pss;
                       ^
../../lto/libiberty/physmem.c: In function 'physmem_available':
../../lto/libiberty/physmem.c:200:23: error: storage size of 'pss' isn't 
known
     struct pst_static pss;
                       ^
../../lto/libiberty/physmem.c:201:24: error: storage size of 'psd' isn't 
known
     struct pst_dynamic psd;
                        ^
../../lto/libiberty/physmem.c:203:2: warning: implicit declaration of 
function 'pstat_getdynamic' [-Wimplicit-function-declaration]
  && 0 <= pstat_getdynamic (&psd, sizeof psd, 1, 0))
  ^
../../lto/libiberty/physmem.c:201:24: warning: unused variable 'psd' 
[-Wunused-variable]
     struct pst_dynamic psd;
                        ^
../../lto/libiberty/physmem.c:200:23: warning: unused variable 'pss' 
[-Wunused-variable]
     struct pst_static pss;
                       ^
make[3]: *** [physmem.o] Error 1
make[3]: Leaving directory `/home/tools/lto/bld/libiberty'
make[2]: *** [all-stage1-libiberty] Error 2
make[2]: Leaving directory `/home/tools/lto/bld'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/tools/lto/bld'
make: *** [all] Error 2

The symptom of some mismatch is in *either* squid or bash, if I use the 
-flto
option, I gets tons of undefined symbols.  W/o -flto in bash I get final
stripped binary about 200K larger...

am using gcc-4.9 tool chain on linux 4.1.0

Thanks for any pointers or where I might direct this..
-l






More information about the Libc-help mailing list