Hi, I seem to have run into a problem when compiling zsh 5.1.1 or older builds down to 5.0.7 with the mathfunc module compiled in. This occurs with regular uclibc as well. Here's the build script I'm using. I run this by typing: sh build "$ARCH".
: ${PREFIX:=/opt} SROOT="$(find $CROSS -maxdepth 1 -type d -name ${1}*)" make clean ./configure --host=$1 --prefix=$PREFIX \ --enable-function-subdirs \ --enable-multibyte --enable-cap \ --disable-dynamic --disable-restricted-r \ --enable-zsh-secure-free --with-tcsetpgrp \ --disable-locale \ CC=$CROSS/bin/gcc \ CFLAGS="-Os -s -I$PREFIX/include -I$SROOT/sysroot/usr/include" \ LDFLAGS="-static -L$PREFIX/lib -L$SROOT/sysroot/usr/lib -Wl,-z,norelro -Wl,--hash-style=gnu" \ LD=$CROSS/bin/ld \ STRIP=$CROSS/bin/strip \ RANLIB=$CROSS/bin/ranlib
# edit config.modules to enable mathfunc make V=1
This is the error I get: /home/jan/a/uclibc-ng-arm.thumb.nolocale.newlibs/bin/gcc -c -I. -I../Src -I../Src -I../Src/Zle -I. -Os -s -I/opt/include -I/home/jan/a/uclibc-ng-arm.thumb.nolocale.newlibs/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/include -DHAVE_CONFIG_H -Os -s -I/opt/include -I/home/jan/a/uclibc-ng-arm.thumb.nolocale.newlibs/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/include -o params.o params.c make[3]: Entering directory '/home/jan/a/zsh-5.1.1/Src/Builtins' make[3]: Leaving directory '/home/jan/a/zsh-5.1.1/Src/Builtins' make[3]: Entering directory '/home/jan/a/zsh-5.1.1/Src/Modules' make[4]: Entering directory '/home/jan/a/zsh-5.1.1/Src/Zle' make[4]: 'complete.mdh' is up to date. make[4]: Leaving directory '/home/jan/a/zsh-5.1.1/Src/Zle' make[3]: Leaving directory '/home/jan/a/zsh-5.1.1/Src/Modules' make[3]: Entering directory '/home/jan/a/zsh-5.1.1/Src/Zle' make[3]: Leaving directory '/home/jan/a/zsh-5.1.1/Src/Zle' make[2]: Leaving directory '/home/jan/a/zsh-5.1.1/Src' Updated `stamp-modobjs'. rm -f zsh /home/jan/a/uclibc-ng-arm.thumb.nolocale.newlibs/bin/gcc -static -L/opt/lib -L/home/jan/a/uclibc-ng-arm.thumb.nolocale.newlibs/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib -Wl,-z,norelro -Wl,--hash-style=gnu -o zsh main.o `cat stamp-modobjs` -lcap -ltinfo -lrt -lm -lc Modules/mathfunc.o: In function `math_func': mathfunc.c:(.text+0x3ba): undefined reference to `j0' mathfunc.c:(.text+0x3c0): undefined reference to `j1' mathfunc.c:(.text+0x3ca): undefined reference to `jn' mathfunc.c:(.text+0x446): undefined reference to `y0' mathfunc.c:(.text+0x44c): undefined reference to `y1' mathfunc.c:(.text+0x456): undefined reference to `yn' collect2: error: ld returned 1 exit status Makefile:229: recipe for target 'zsh' failed make[1]: *** [zsh] Error 1 make[1]: Leaving directory '/home/jan/a/zsh-5.1.1/Src' Makefile:190: recipe for target 'all' failed make: *** [all] Error 1
I'm not sure what to make of this. I know that uclibc/uclibc-ng has the bessel functions in libm, but the zsh build still gives this error. I was able to compile zsh with the mathfunc module using a musl toolchain, so I think this is specific to uclibc. The uclibc-ng toolchain I'm using is from a buildroot 08/2015 configuration. I'd really appreciate some pointers on this.
Best regards, Jan
Hi Jan, Jan wrote,
Hi, I seem to have run into a problem when compiling zsh 5.1.1 or older builds down to 5.0.7 with the mathfunc module compiled in. This occurs with regular uclibc as well. Here's the build script I'm using. I run this by typing: sh build "$ARCH".
Are you enabling DO_XSI_MATH in uClibc .config? As uClibc is very modular and configurable, the bessel functions are not enabled by default.
Best regards Waldemar