reiser4progs - linking to libreiser4 gives "undefined reference to misc_str2long"
Quoted 1 line · Matthew White
Hello,
Hi Matthew,
Quoted 3 lines
I was having problems linking to libreiser4 once it is installed into my system, even compiling a dumb program fails (see
test-libreiser4.c).
Ummm, indeed, it doesn't work. The next surprise for me is that it also doesn't work if we build/install reiser4progs rolled back to the old commits. Whereas reiser4 support in grub also includes libreiser4.h header:
https://github.com/edward6/reiser4progs/blob/master/grub-0.97-reiser4-20060227.diff
It could happen that I missed something though..
Quoted 12 lines
Compiler: gcc (Gentoo 9.3.0-r1 p3) 9.3.0
OS: Gentoo GNU/Linux
reiser4progs versions tested: v1.2.1, v2.0.2, v2.0.3, v2.0.4 (github)$ /usr/bin/ld: /lib64/libreiser4-1.2.so.1: undefined reference to `misc_str2long' $ collect2: error: ld returned 1 exit statusI attach the dumb program used for testing '
test-libreiser4.c' and also patches to https://github.com/edward6/reiser4progs [master (v1.2.1) and format41 (v2.0.4) branches].
Quoted 6 lines
Details are in the patches and also here: https://bugs.gentoo.org/754924
The solution I adopted is to compile libreiser4 (libreiser4/Makefile.am) linking it also to the libmisc convenience library (static libtool).
Is there a specific reason to not making libmisc an installable library?
I don't know such reasons. I'll merge your patches. Double thanks for the "format41" branch :)
Edward.
Quoted 10 lines
Or, instead, why not linking libreiser4 to a static libmisc, and then to use just libreiser4 when lining demo/* and progs/* (Makefile.am files)?
Thanks.
- Matthew--
Matthew White <[email protected]>