brummer10 / guitarix

guitarix virtual versatile amplification for Jack/Linux
254 stars 28 forks source link

build fail due undefined section `.rt.text' #13

Closed KottV closed 4 years ago

KottV commented 4 years ago

Hi,

While local build is fine I'm stuck with building 0.40.0 in open build service:

[  235s] /usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld:../src/LV2/gx_cabinet.lv2/gx_cabinet.lds:1: undefined section `.rt.text' referenced in expression
[  235s] collect2: error: ld returned 1 exit status
[  235s]
[  237s] Waf: Leaving directory `/home/abuild/rpmbuild/BUILD/guitarix-0.40.0/build'
[  237s] Build failed
[  237s]  -> task in 'gx_cabinet' failed with exit status 1:
[  237s]        {task 140328447568576: cxxshlib gxcabinet.cpp.1.o,gx_convolver.cc.1.o,gx_resampler.cc.2.o,resampler.cc.2.o,resampler-table.cc.2.o -> gx_cabinet.so}
[  237s] ['/usr/bin/g++', '-shared', 'src/LV2/gx_cabinet.lv2/gxcabinet.cpp.1.o', 'src/LV2/DSP/gx_convolver.cc.1.o', 'src/LV2/DSP/gx_resampler.cc.2.o', 'src/zita-resampler-1.1.0/resampler.cc.2.o', 'src/zita-resampler-1.1.0/resampler-table.cc.2.o', '-o/home/abuild/rpmbuild/BUILD/guitarix-0.40.0/build/src/LV2/gx_cabinet.lv2/gx_cabinet.so', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-lglibmm-2.4', '-lgobject-2.0', '-lglib-2.0', '-lsigc-2.0', '-lzita-convolver', '-Wl,../src/LV2/gx_cabinet.lv2/gx_cabinet.lds', '-Wl,-Map=src/LV2/gx_cabinet.lv2/gx_cabinet.map']

Maybe you have any ideas? openSUSE TW, gcc 9.3.1

brummer10 commented 4 years ago

I've no idea why that may happen, Maybe try to build in verbose mode ( -v) to get a more detailed output. Maybe it's a race condition when the build server have much cores? You may try to restrict the jobs ( -j 4) for example.

KottV commented 4 years ago

It's was with -v switch. I've tried to build with single thread even, but got same result. Ok I'm gonna dig further and try to find difference between pure local and OBS build.

brummer10 commented 4 years ago

when you found a solution, let me know please.

KottV commented 4 years ago

Disabling link time optimization (LTO) solves problem.

brummer10 commented 4 years ago

Ah, good to know. So I should add -fno-lto to the build flags of those parts were we use ldscripts. Thanks for feedback.