Hey all -- I'm new to Crux64 as of yesterday, at present I'm using Daniel Mueller's (STABLE) image. I'm trying to install VMware GSX Server.... emphasis on trying, it's giving me a real hard time. I've gotten the base to install, however vmware-authd needs PAM... more specifically, 32bit PAM. I've sluffed together the following Pkgfile: name=Linux-PAM version=0.81 release=1 source=(http://www.kernel.org/pub/linux/libs/pam/pre/library/$name-$version.tar.gz) build() { export PKG_CONFIG_PATH=/usr/lib32/pkgconfig export CFLAGS="-m32 -O2 -march=i686 -pipe" export CXXFLAGS="-m32 -O2 -march=i686 -pipe" export LDFLAGS="-L/usr/lib32 $LDFLAGS" cd $name-$version linux32 ./configure --prefix=/usr --libdir=/usr/lib32 --enable-fakeroot="$PKG" linux32 make make install } It almost works... except for this: make[2]: Entering directory `/usr/ports/my_ports/linux-pam32/work/src/Linux-PAM-0.81/modules/pam_access' mkdir -p ./dynamic gcc -Wall -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wshadow -Dlinux -m32 -O2 -march=i686 -pipe -I./include -I/usr/ports/my_ports/linux-pam32/work/src/Linux-PAM-0.81/libpam/include -I/usr/ports/my_ports/linux-pam32/work/src/Linux-PAM-0.81 -I/usr/ports/my_ports/linux-pam32/work/src/Linux-PAM-0.81/libpamc/include -fPIC -DDEFAULT_CONF_FILE=\"/usr/etc/security/access.conf\" -I../pammodutil/include -DPAM_DYNAMIC -c pam_access.c -o dynamic/pam_access.o gcc -shared -L/usr/lib32 -o pam_access.so dynamic/pam_access.o -lnsl -lc -L../pammodutil -lpammodutil -L../../libpam -lpam /usr/bin/ld: skipping incompatible /usr/lib32/libnsl.so when searching for -lnsl /usr/bin/ld: skipping incompatible /usr/lib32/libnsl.a when searching for -lnsl /usr/bin/ld: skipping incompatible /usr/lib32/libc.so when searching for -lc /usr/bin/ld: skipping incompatible /usr/lib32/libc.a when searching for -lc /usr/bin/ld: skipping incompatible ../pammodutil/libpammodutil.a when searching for -lpammodutil /usr/bin/ld: cannot find -lpammodutil collect2: ld returned 1 exit status make[2]: *** [pam_access.so] Error 1 make[2]: Leaving directory `/usr/ports/my_ports/linux-pam32/work/src/Linux-PAM-0.81/modules/pam_access' make[1]: *** [all] Error 1 make[1]: Leaving directory `/usr/ports/my_ports/linux-pam32/work/src/Linux-PAM-0.81/modules' make: *** [modules] Error 2 =======> ERROR: Building '/usr/ports/my_ports/linux-pam32/Linux-PAM#0.81-1.pkg.tar.gz' failed. Also, throught the build log I'm seeing these messages... /usr/bin/ld: skipping incompatible /usr/lib32/libc.so when searching for -lc /usr/bin/ld: skipping incompatible /usr/lib32/libc.a when searching for -lc /usr/bin/ld: skipping incompatible /usr/lib32/libdl.so when searching for -ldl /usr/bin/ld: skipping incompatible /usr/lib32/libdl.a when searching for -ldl /usr/bin/ld: skipping incompatible /usr/lib32/libc.so when searching for -lc /usr/bin/ld: skipping incompatible /usr/lib32/libc.a when searching for -lc /usr/bin/ld: warning: i386 architecture of input file `dynamic/pam_item.o' is incompatible with i386:x86-64 output /usr/bin/ld: warning: i386 architecture of input file `dynamic/pam_strerror.o' is incompatible with i386:x86-64 output /usr/bin/ld: warning: i386 architecture of input file `dynamic/pam_end.o' is incompatible with i386:x86-64 output /usr/bin/ld: warning: i386 architecture of input file `dynamic/pam_start.o' is incompatible with i386:x86-64 output /usr/bin/ld: warning: i386 architecture of input file `dynamic/pam_data.o' is incompatible with i386:x86-64 output /usr/bin/ld: warning: i386 architecture of input file `dynamic/pam_delay.o' is incompatible with i386:x86-64 output /usr/bin/ld: warning: i386 architecture of input file `dynamic/pam_dispatch.o' is incompatible with i386:x86-64 output /usr/bin/ld: warning: i386 architecture of input file `dynamic/pam_handlers.o' is incompatible with i386:x86-64 output /usr/bin/ld: warning: i386 architecture of input file `dynamic/pam_misc.o' is incompatible with i386:x86-64 output /usr/bin/ld: warning: i386 architecture of input file `dynamic/pam_account.o' is incompatible with i386:x86-64 output /usr/bin/ld: warning: i386 architecture of input file `dynamic/pam_auth.o' is incompatible with i386:x86-64 output /usr/bin/ld: warning: i386 architecture of input file `dynamic/pam_prelude.o' is incompatible with i386:x86-64 output /usr/bin/ld: warning: i386 architecture of input file `dynamic/pam_session.o' is incompatible with i386:x86-64 output /usr/bin/ld: warning: i386 architecture of input file `dynamic/pam_password.o' is incompatible with i386:x86-64 output /usr/bin/ld: warning: i386 architecture of input file `dynamic/pam_env.o' is incompatible with i386:x86-64 output /usr/bin/ld: warning: i386 architecture of input file `dynamic/pam_log.o' is incompatible with i386:x86-64 output Obviously I'm missing something... it's getting half confused between 32 / 64 bit. Any suggestions would be greatly appreciated. -- David M. Strang
On Thursday 10 November 2005 18:09, David M. Strang wrote:
gcc -shared -L/usr/lib32 -o pam_access.so dynamic/pam_access.o -lnsl -lc -L../pammodutil -lpammodutil -L../../libpam -lpam /usr/bin/ld: skipping incompatible /usr/lib32/libnsl.so when searching for -lnsl /usr/bin/ld: skipping incompatible /usr/lib32/libnsl.a when searching for -lnsl /usr/bin/ld: skipping incompatible /usr/lib32/libc.so when searching for
Oh oh, you have to check the Makefile. It is using a separate step to link all object files together into one shared library file. Unfortunately it forgot to add GCC's '-m32' command line option. :-( (Remember -m32 = 32bit output, -m64 = 64bit output; standard/if nothing specified => -m64) Your CFLAGS are okay but they are not applied here. Try it again with the 'CC' special variable set: [..] export CC="gcc -m32" ./configure .. bla bla make .. bla bla [..]
/usr/bin/ld: skipping incompatible /usr/lib32/libc.so when searching for -lc /usr/bin/ld: skipping incompatible /usr/lib32/libc.a when searching for -lc /usr/bin/ld: skipping incompatible /usr/lib32/libdl.so when searching -lc /usr/bin/ld: warning: i386 architecture of input file `dynamic/pam_item.o' is incompatible with i386:x86-64 output /usr/bin/ld: warning: i386 architecture of input file `dynamic/pam_strerror.o' is incompatible with i386:x86-64 output
These are the typical error/warning messages you get when you try to link both, 32bit and 64bit object files together. You cannot mix 32bit and 64bit object files. bye, danm -- Daniel Mueller Berlin, Germany OpenPGP: 1024D/E4F4383A
On Thursday 10 November 2005 12:54, Daniel Mueller wrote:
gcc -shared -L/usr/lib32 -o pam_access.so dynamic/pam_access.o -lnsl -lc -L../pammodutil -lpammodutil -L../../libpam -lpam /usr/bin/ld: skipping incompatible /usr/lib32/libnsl.so when searching for -lnsl /usr/bin/ld: skipping incompatible /usr/lib32/libnsl.a when searching for -lnsl /usr/bin/ld: skipping incompatible /usr/lib32/libc.so when searching for
Oh oh, you have to check the Makefile. It is using a separate step to link all object files together into one shared library file. Unfortunately it forgot to add GCC's '-m32' command line option. :-( (Remember -m32 = 32bit output, -m64 = 64bit output; standard/if nothing specified => -m64)
Your CFLAGS are okay but they are not applied here. Try it again with the 'CC' special variable set:
[..] export CC="gcc -m32" ./configure .. bla bla make .. bla bla [..]
No luck there, I did however check out the Makefile... .and as a result, I've done the following: build() { export PKG_CONFIG_PATH=/usr/lib32/pkgconfig export CFLAGS="-m32 -O2 -march=i686 -pipe" export CXXFLAGS="-m32 -O2 -march=i686 -pipe" export LDFLAGS="-m32 -L/usr/lib32 $LDFLAGS" cd $name-$version linux32 ./configure --prefix=/usr --libdir=/usr/lib32 --enable-fakeroot="$PKG" linux32 make make install } This gets me a lot farther... except now it dies here. gcc -o bigcrypt bigcrypt_main.o bigcrypt.o -lcrypt -lnsl -L../pammodutil -lpammodutil -lcrypt /usr/bin/ld: skipping incompatible ../pammodutil/libpammodutil.a when searching for -lpammodutil /usr/bin/ld: cannot find -lpammodutil collect2: ld returned 1 exit status make[2]: *** [bigcrypt] Error 1 make[2]: Leaving directory `/usr/ports/my_ports/linux-pam32/work/src/Linux-PAM-0.81/modules/pam_unix' make[1]: *** [all] Error 1 make[1]: Leaving directory `/usr/ports/my_ports/linux-pam32/work/src/Linux-PAM-0.81/modules' make: *** [modules] Error 2 =======> ERROR: Building '/usr/ports/my_ports/linux-pam32/Linux-PAM#0.81-1.pkg.tar.gz' failed. I think I hate this makefile... This Makefile imports a Make.Rules... Here is the relevent section: # generic build setup OS=linux CC=gcc CFLAGS=$(WARNINGS) -D$(OS) -m32 -O2 -march=i686 -pipe $(OS_CFLAGS) $(HEADER_DIRS) LDFLAGS=-m32 -L/usr/lib32 -L/usr/lib32 LD=gcc LD_D=gcc -shared -m32 -L/usr/lib32 -L/usr/lib32 LD_L=gcc -shared -m32 -L/usr/lib32 -L/usr/lib32 I've added an export for CC and LD... but it doesn't care. I think I may need to manually patch this file. -- David M. Strang
Just for the sake of comleteness, and in case anyone else has the same problem -- here is my Pkgfile & patch file: -- begin pkgfile -- # $Id: Pkgfile,v 1.1.1.1 2005/11/10 13:01:42 crux Exp $ name=linux-pam32 version=0.81 release=1 source=(http://www.kernel.org/pub/linux/libs/pam/pre/library/Linux-PAM-$version.tar.... Make.Rules.patch) build() { export PKG_CONFIG_PATH=/usr/lib32/pkgconfig export CFLAGS="-m32 -O2 -march=i686 -pipe" export CXXFLAGS="-m32 -O2 -march=i686 -pipe" export LDFLAGS="-m32 -L/usr/lib32 $LDFLAGS" cd Linux-PAM-$version ./configure --prefix=/usr --libdir=/usr/lib32 --includedir=/usr/include32 --enable-fakeroot="$PKG" patch < ../Make.Rules.patch make make install } -- end pkgfile -- -- begin patch -- --- Make.Rules 2005-11-10 13:27:16.000000000 -0500 +++ Make.Rules.fix 2005-11-10 13:27:45.000000000 -0500 @@ -91,15 +91,15 @@ SECUREDIR=/usr/lib32/security SCONFIGD=${prefix}/etc/security SUPLEMENTED=${exec_prefix}/sbin -INCLUDED=/usr/include/security +INCLUDED=/usr/include32/security CRACKLIB_DICTPATH= # generic build setup OS=linux -CC=gcc +CC=gcc -m32 CFLAGS=$(WARNINGS) -D$(OS) -m32 -O2 -march=i686 -pipe $(OS_CFLAGS) $(HEADER_DIRS) LDFLAGS=-m32 -L/usr/lib32 -L/usr/lib32 -LD=gcc +LD=gcc -m32 LD_D=gcc -shared -m32 -L/usr/lib32 -L/usr/lib32 LD_L=gcc -shared -m32 -L/usr/lib32 -L/usr/lib32 MV=@MV@ -- end patch -- This appears to work (builds, and compiles, and installs!) -- David M. Strang
participants (2)
-
Daniel Mueller
-
David M. Strang