Fails to build
Closed this issue · 6 comments
readline: https://ci.bobbuildtool.dev/jenkins/view/basement/job/basement-libs__readline-1/25/
x86_64-wendy-linux-gnu-gcc -shared -Wl,-soname,libhistory.so.8.0 -Wl,-O1 -Wl,--hash-style=gnu -L/home/jenkins/workspace/basement-libs__readline-1/libs/ncurses-dev/x86_64-wendy-linux-gnu/dist/17-7590-3fdb/usr/lib -L./lib/termcap -Wl,-rpath,/usr/lib -Wl,-soname,`basename libhistory.so.8.0 .0` -o libhistory.so.8.0 history.so histexpand.so histfile.so histsearch.so shell.so mbutil.so xmalloc.so xfree.so -ltinfo
mv compat.o compat.so
mv parse-colors.o parse-colors.so
/home/jenkins/bob/bc/d8bc613012ef866187e74fd2318b08476bc549450a9387162ea23ee9799e2aad55f4a07b4df216-2/content/usr/bin/../lib/gcc/x86_64-wendy-linux-gnu/9.2.0/../../../../x86_64-wendy-linux-gnu/bin/ld: cannot find -ltinfo
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:181: libhistory.so.8.0] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/jenkins/workspace/basement-libs__readline-1/libs/readline-tgt/x86_64-wendy-linux-gnu/build/17-7590-3fdb/build/shlib'
make: *** [Makefile:219: shared] Error 2
Python3: https://ci.bobbuildtool.dev/jenkins/view/basement/job/basement-python__python3-1/26/
Failed to build these modules:
_curses _curses_panel
make: *** [Makefile:616: sharedmods] Error 1
Most probably regression from #51.
Hey, i detected the problem, there is a patch file for readline
, with statically searchs for tinfo
library.
The name of the library with widec feature is suffixed with a 'w' now .
maybe we can remove that patch file and use pkg-config to get the linker flags, if not already fixed in this package version (or we could try to update the package).
I have a wsl ubuntu 16 lts without installed tinfo library. i will fix it, hopefully :)
the second issue occurs because of missing -fPIC
while building ncurses
.
ofc i could add it to the CFLAGS of the package, but imo we should add this to the global compiler flags.
if i have understood -fPIC
correctly, every package in bob should/could have it :)
@jkloetzke what do u think?
Fails to build:
[ 20] BUILD libs::readline-tgt - dev/build/libs/readline-dev/x86_64-wendy-linux-gnu/1/workspace
[ 20] |libs::readline-tgt| make[1]: warning: -j4 forced in submake: resetting jobserver mode.
[ 20] |libs::readline-tgt| /home/jkloetzke/src/bob/playground/basement/tests/linux/dev/dist/devel/cross-toolchain/1/workspace/usr/bin/../lib/gcc/x86_64-wendy-linux-gnu/9.2.0/../../../../x86_64-wendy-linux-gnu/bin/ld: cannot find -ltinfo
[ 20] |libs::readline-tgt| collect2: error: ld returned 1 exit status
[ 20] |libs::readline-tgt| make[1]: *** [Makefile:177: libreadline.so.8.0] Error 1
[ 20] |libs::readline-tgt| make[1]: *** Waiting for unfinished jobs....
[ 20] |libs::readline-tgt| /home/jkloetzke/src/bob/playground/basement/tests/linux/dev/dist/devel/cross-toolchain/1/workspace/usr/bin/../lib/gcc/x86_64-wendy-linux-gnu/9.2.0/../../../../x86_64-wendy-linux-gnu/bin/ld: cannot find -ltinfo
[ 20] |libs::readline-tgt| collect2: error: ld returned 1 exit status
[ 20] |libs::readline-tgt| make[1]: *** [Makefile:181: libhistory.so.8.0] Error 1
[ 20] |libs::readline-tgt| make: *** [Makefile:219: shared] Error 2
[ 20] |libs::readline-tgt| Step failed with return status 2; Command: make "$@"
[ 20] |libs::readline-tgt| Call stack (most recent call first)
[ 20] |libs::readline-tgt| #0: Class make, layer self, line 7, in makeParallel
[ 20] |libs::readline-tgt| #1: Class autotools, layer self, line 77, in autotoolsBuild
[ 20] |libs::readline-tgt| #2: Recipe libs::readline#1, layer self, line 3, in main
About -fPIC
: what is the actual problem? Unconditionally adding this switch is certainly not the right thing.
if the -ltinfo
is fixed, than just this error is breaking the build for me:
/home/jenkins/bob/bc/d8bc613012ef866187e74fd2318b08476bc549450a9387162ea23ee9799e2aad55f4a07b4df216-2/content/usr/bin/../lib/gcc/x86_64-wendy-linux-gnu/9.2.0/../../../../x86_64-wendy-linux-gnu/bin/ld: /home/jenkins/workspace/basement-python__python3-1/libs/ncurses-dev/x86_64-wendy-linux-gnu/dist/17-7590-3fdb/usr/lib/libncursesw.a(lib_set_term.o): relocation R_X86_64_32S against undefined symbol `_nc_outch_sp' can not be used when making a shared object; recompile with -fPIC
-fPIC
is missing for ncurses
package. my idea was, that we should add -fPIC
for all packages generally.
Static libraries do not need it unless you link static libraries into shared libraries.
here the ncurses is built static only, and will be build into shared python3 library:
_curses.cpython-38-x86_64-linux-gnu.so
oups. i failed :-/ thx!