Re: [Ocfs2-users] Compiling ocfs2-tools-1.6.3 on slackware64-13.1
I don't believe slackware has a build-everything-static mode. Every package (if correctly built) includes a script responsible for building said package (it compiles and packages all files that result from compilation). This script is called a SlackBuild. The point is: we actually have to modify some SlackBuild scripts (like the vlc.SlackBuild) to force a static-build when that is desirable. Anyway, although ocfs2-tools now compiles with no errors (thanks to the precious help from Sunil Mushran) but only after manually editing o2image's Makefile to accept the -lpthread flag (as per Sunil's suggestion) I do appreciate that you took the time to explain what was probably wrong to begin with. I'm sure that with your help we'll be able to come up with a working ocfs2 setup on slackware :) One other thing: the --libdir flag was not respected and some python files ended up in the wrong directory, making the console fail. I fixed that by manually copying the files to their proper place, but console still does not work :( I have not tried a command line only setup because I really want the to fix the issue with the console first. - Mensagem Original - De: Joel Becker joel.bec...@oracle.com Para: pica pica pica6...@aeiou.pt Cc: Sunil Mushran sunil.mush...@oracle.com, ocfs2-users@oss.oracle.com Enviado: Thu, 2 Dec 2010 05:18:31 + (WET) Assunto: Re: [Ocfs2-users] Compiling ocfs2-tools-1.6.3 on slackware64-13.1 Does Slackware have a build-everything-static mode? The compile line does not have -static, so I'm guessing it is in your toolchain. --- Venha conhecer o novo AEIOU: http://www.aeiou.pt ___ Ocfs2-users mailing list Ocfs2-users@oss.oracle.com http://oss.oracle.com/mailman/listinfo/ocfs2-users
Re: [Ocfs2-users] Compiling ocfs2-tools-1.6.3 on slackware64-13.1
On Wed, Dec 01, 2010 at 02:15:24AM +, pica pica wrote: Any clues as to what could be wrong? What is breaking is that libcom_err only has a dynamic object, so it dynamically references sem_init, etc. When the linker tries to resolve that, it can't find it. Adding -lpthread directly specifies the location of sem_init. This all is not necessary when runtime linking is used (ld.so). Thus, we know you are getting a static build. Something about your build environment is causing a static build. Does Slackware have a build-everything-static mode? The compile line does not have -static, so I'm guessing it is in your toolchain. Would the las 2 flags not force a dynamic build? They force ocfs2-tools to build dynamically, ie, without -static. If your toolchain is doing something underneath, our configure script can't fix that. Joel -- I don't want to achieve immortality through my work; I want to achieve immortality through not dying. - Woody Allen Joel Becker Senior Development Manager Oracle E-mail: joel.bec...@oracle.com Phone: (650) 506-8127 ___ Ocfs2-users mailing list Ocfs2-users@oss.oracle.com http://oss.oracle.com/mailman/listinfo/ocfs2-users
Re: [Ocfs2-users] Compiling ocfs2-tools-1.6.3 on slackware64-13.1
On 11/30/2010 10:03 AM, pica pica wrote: Hello all, I'm having trouble compiling ocfs2-tools-1.6.3 on slackware64-13.1 These are my configure flags (the last 2 I added after googling this problem, but didn't help): ./configure \ --sbindir=/sbin \ --bin=/bin \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --datadir=/etc/ocfs2 \ --sharedstatedir=/var/ocfs2 \ --libexecdir=/usr/libexec \ --localstatedir=/var \ --mandir=/usr/man \ --build=$ARCH-slackware-linux \ --enable-dynamic-fsck \ --enable-dynamic-ctl I get this error: gcc -O2 -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -pipe -o fsck.ocfs2 fsck.o dirblocks.o dirparents.o extent.o icount.o journal.o pass0.o pass1.o pass1b.o pass2.o pass3.o pass4.o pass5.o problem.o refcount.o slot_recovery.o strings.o util.o xattr.o ../libocfs2/libocfs2.a ../libo2dlm/libo2dlm.a ../libo2cb/libo2cb.a -L../libocfs2 -locfs2 -L../libo2dlm -lo2dlm -L../libo2cb -lo2cb -L/lib64 -lcom_err /lib64/libcom_err.a(error_message.o): In function `setup_et_lock': error_message.c:(.text+0x1a3): undefined reference to `sem_init' /lib64/libcom_err.a(error_message.o): In function `fini_et_lock': error_message.c:(.text+0x1cc): undefined reference to `sem_destroy' /lib64/libcom_err.a(error_message.o): In function `et_list_lock': error_message.c:(.text+0x1ff): undefined reference to `sem_wait' /lib64/libcom_err.a(error_message.o): In function `et_list_unlock': error_message.c:(.text+0x228): undefined reference to `sem_post' collect2: ld returned 1 exit status make[1]: *** [fsck.ocfs2] Error 1 make[1]: Leaving directory `/tmp/SBo/ocfs2-tools-1.6.3/fsck.ocfs2' make: *** [fsck.ocfs2] Error 2 Something is not right in your setup. It appears to be forcing a static build. Try adding -lpthread. ___ Ocfs2-users mailing list Ocfs2-users@oss.oracle.com http://oss.oracle.com/mailman/listinfo/ocfs2-users
Re: [Ocfs2-users] Compiling ocfs2-tools-1.6.3 on slackware64-13.1
Hello Sunil, Any clues as to what could be wrong? Would the las 2 flags not force a dynamic build? Also, and sorry for asking but I'm new at this, where exactly should I add -lpthread to? - Mensagem Original - De: Sunil Mushran sunil.mush...@oracle.com Para: pica pica pica6...@aeiou.pt Cc: ocfs2-users@oss.oracle.com Enviado: Tue, 30 Nov 2010 20:47:17 + (WET) Assunto: Re: [Ocfs2-users] Compiling ocfs2-tools-1.6.3 on slackware64-13.1 Something is not right in your setup. It appears to be forcing a static build. Try adding -lpthread. On 11/30/2010 10:03 AM, pica pica wrote: Hello all, I'm having trouble compiling ocfs2-tools-1.6.3 on slackware64-13.1 These are my configure flags (the last 2 I added after googling this problem, but didn't help): ./configure \ --sbindir=/sbin \ --bin=/bin \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --datadir=/etc/ocfs2 \ --sharedstatedir=/var/ocfs2 \ --libexecdir=/usr/libexec \ --localstatedir=/var \ --mandir=/usr/man \ --build=$ARCH-slackware-linux \ --enable-dynamic-fsck \ --enable-dynamic-ctl I get this error: gcc -O2 -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -pipe -o fsck.ocfs2 fsck.o dirblocks.o dirparents.o extent.o icount.o journal.o pass0.o pass1.o pass1b.o pass2.o pass3.o pass4.o pass5.o problem.o refcount.o slot_recovery.o strings.o util.o xattr.o ../libocfs2/libocfs2.a ../libo2dlm/libo2dlm.a ../libo2cb/libo2cb.a -L../libocfs2 -locfs2 -L../libo2dlm -lo2dlm -L../libo2cb -lo2cb -L/lib64 -lcom_err /lib64/libcom_err.a(error_message.o): In function `setup_et_lock': error_message.c:(.text+0x1a3): undefined reference to `sem_init' /lib64/libcom_err.a(error_message.o): In function `fini_et_lock': error_message.c:(.text+0x1cc): undefined reference to `sem_destroy' /lib64/libcom_err.a(error_message.o): In function `et_list_lock': error_message.c:(.text+0x1ff): undefined reference to `sem_wait' /lib64/libcom_err.a(error_message.o): In function `et_list_unlock': error_message.c:(.text+0x228): undefined reference to `sem_post' collect2: ld returned 1 exit status make[1]: *** [fsck.ocfs2] Error 1 make[1]: Leaving directory `/tmp/SBo/ocfs2-tools-1.6.3/fsck.ocfs2' make: *** [fsck.ocfs2] Error 2 --- Venha conhecer o novo AEIOU: http://www.aeiou.pt ___ Ocfs2-users mailing list Ocfs2-users@oss.oracle.com http://oss.oracle.com/mailman/listinfo/ocfs2-users
Re: [Ocfs2-users] Compiling ocfs2-tools-1.6.3 on slackware64-13.1
It looks ok as far as the ocfs2-tools build scripts are concerned. Note no -static. But I don't know anything about slackware build environment. Easiest would be to rerun the same command with -lpthread. See if that works. # cd .../fsck.ocfs2 # gcc -O2 -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -pipe -o fsck.ocfs2 fsck.o dirblocks.o dirparents.o extent.o icount.o journal.o pass0.o pass1.o pass1b.o pass2.o pass3.o pass4.o pass5.o problem.o refcount.o slot_recovery.o strings.o util.o xattr.o ../libocfs2/libocfs2.a ../libo2dlm/libo2dlm.a ../libo2cb/libo2cb.a -L../libocfs2 -locfs2 -L../libo2dlm -lo2dlm -L../libo2cb -lo2cb -L/lib64 -lcom_err -lpthread On 11/30/2010 06:15 PM, pica pica wrote: Hello Sunil, Any clues as to what could be wrong? Would the las 2 flags not force a dynamic build? Also, and sorry for asking but I'm new at this, where exactly should I add -lpthread to? - Mensagem Original - De: Sunil Mushransunil.mush...@oracle.com Para: pica picapica6...@aeiou.pt Cc: ocfs2-users@oss.oracle.com Enviado: Tue, 30 Nov 2010 20:47:17 + (WET) Assunto: Re: [Ocfs2-users] Compiling ocfs2-tools-1.6.3 on slackware64-13.1 Something is not right in your setup. It appears to be forcing a static build. Try adding -lpthread. On 11/30/2010 10:03 AM, pica pica wrote: Hello all, I'm having trouble compiling ocfs2-tools-1.6.3 on slackware64-13.1 These are my configure flags (the last 2 I added after googling this problem, but didn't help): ./configure \ --sbindir=/sbin \ --bin=/bin \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --datadir=/etc/ocfs2 \ --sharedstatedir=/var/ocfs2 \ --libexecdir=/usr/libexec \ --localstatedir=/var \ --mandir=/usr/man \ --build=$ARCH-slackware-linux \ --enable-dynamic-fsck \ --enable-dynamic-ctl I get this error: gcc -O2 -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -pipe -o fsck.ocfs2 fsck.o dirblocks.o dirparents.o extent.o icount.o journal.o pass0.o pass1.o pass1b.o pass2.o pass3.o pass4.o pass5.o problem.o refcount.o slot_recovery.o strings.o util.o xattr.o ../libocfs2/libocfs2.a ../libo2dlm/libo2dlm.a ../libo2cb/libo2cb.a -L../libocfs2 -locfs2 -L../libo2dlm -lo2dlm -L../libo2cb -lo2cb -L/lib64 -lcom_err /lib64/libcom_err.a(error_message.o): In function `setup_et_lock': error_message.c:(.text+0x1a3): undefined reference to `sem_init' /lib64/libcom_err.a(error_message.o): In function `fini_et_lock': error_message.c:(.text+0x1cc): undefined reference to `sem_destroy' /lib64/libcom_err.a(error_message.o): In function `et_list_lock': error_message.c:(.text+0x1ff): undefined reference to `sem_wait' /lib64/libcom_err.a(error_message.o): In function `et_list_unlock': error_message.c:(.text+0x228): undefined reference to `sem_post' collect2: ld returned 1 exit status make[1]: *** [fsck.ocfs2] Error 1 make[1]: Leaving directory `/tmp/SBo/ocfs2-tools-1.6.3/fsck.ocfs2' make: *** [fsck.ocfs2] Error 2 --- Venha conhecer o novo AEIOU: http://www.aeiou.pt ___ Ocfs2-users mailing list Ocfs2-users@oss.oracle.com http://oss.oracle.com/mailman/listinfo/ocfs2-users
Re: [Ocfs2-users] Compiling ocfs2-tools-1.6.3 on slackware64-13.1
-unneeded 2 /dev/null || true ( cd $PKG/usr/man find . -type f -exec gzip -9 {} \; for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done ) mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a COPYING CREDITS MAINTAINERS README README.O2CB $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc $PKG/install/slack-desc cd $PKG /sbin/makepkg -l y -c n $CWD/../$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} - Mensagem Original - De: Sunil Mushran sunil.mush...@oracle.com Para: pica pica pica6...@aeiou.pt Cc: ocfs2-users@oss.oracle.com Enviado: Wed, 1 Dec 2010 02:29:33 + (WET) Assunto: Re: [Ocfs2-users] Compiling ocfs2-tools-1.6.3 on slackware64-13.1 It looks ok as far as the ocfs2-tools build scripts are concerned. Note no -static. But I don't know anything about slackware build environment. Easiest would be to rerun the same command with -lpthread. See if that works. # cd .../fsck.ocfs2 # gcc -O2 -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -pipe -o fsck.ocfs2 fsck.o dirblocks.o dirparents.o extent.o icount.o journal.o pass0.o pass1.o pass1b.o pass2.o pass3.o pass4.o pass5.o problem.o refcount.o slot_recovery.o strings.o util.o xattr.o ../libocfs2/libocfs2.a ../libo2dlm/libo2dlm.a ../libo2cb/libo2cb.a -L../libocfs2 -locfs2 -L../libo2dlm -lo2dlm -L../libo2cb -lo2cb -L/lib64 -lcom_err -lpthread On 11/30/2010 06:15 PM, pica pica wrote: Hello Sunil, Any clues as to what could be wrong? Would the las 2 flags not force a dynamic build? Also, and sorry for asking but I'm new at this, where exactly should I add -lpthread to? - Mensagem Original - De: Sunil Mushransunil.mush...@oracle.com Para: pica picapica6...@aeiou.pt Cc: ocfs2-users@oss.oracle.com Enviado: Tue, 30 Nov 2010 20:47:17 + (WET) Assunto: Re: [Ocfs2-users] Compiling ocfs2-tools-1.6.3 on slackware64-13.1 Something is not right in your setup. It appears to be forcing a static build. Try adding -lpthread. On 11/30/2010 10:03 AM, pica pica wrote: Hello all, I'm having trouble compiling ocfs2-tools-1.6.3 on slackware64-13.1 These are my configure flags (the last 2 I added after googling this problem, but didn't help): ./configure \ --sbindir=/sbin \ --bin=/bin \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --datadir=/etc/ocfs2 \ --sharedstatedir=/var/ocfs2 \ --libexecdir=/usr/libexec \ --localstatedir=/var \ --mandir=/usr/man \ --build=$ARCH-slackware-linux \ --enable-dynamic-fsck \ --enable-dynamic-ctl I get this error: gcc -O2 -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -pipe -o fsck.ocfs2 fsck.o dirblocks.o dirparents.o extent.o icount.o journal.o pass0.o pass1.o pass1b.o pass2.o pass3.o pass4.o pass5.o problem.o refcount.o slot_recovery.o strings.o util.o xattr.o ../libocfs2/libocfs2.a ../libo2dlm/libo2dlm.a ../libo2cb/libo2cb.a -L../libocfs2 -locfs2 -L../libo2dlm -lo2dlm -L../libo2cb -lo2cb -L/lib64 -lcom_err /lib64/libcom_err.a(error_message.o): In function `setup_et_lock': error_message.c:(.text+0x1a3): undefined reference to `sem_init' /lib64/libcom_err.a(error_message.o): In function `fini_et_lock': error_message.c:(.text+0x1cc): undefined reference to `sem_destroy' /lib64/libcom_err.a(error_message.o): In function `et_list_lock': error_message.c:(.text+0x1ff): undefined reference to `sem_wait' /lib64/libcom_err.a(error_message.o): In function `et_list_unlock': error_message.c:(.text+0x228): undefined reference to `sem_post' collect2: ld returned 1 exit status make[1]: *** [fsck.ocfs2] Error 1 make[1]: Leaving directory `/tmp/SBo/ocfs2-tools-1.6.3/fsck.ocfs2' make: *** [fsck.ocfs2] Error 2 --- Venha conhecer o novo AEIOU: http://www.aeiou.pt ___ Ocfs2-users mailing list Ocfs2-users@oss.oracle.com http://oss.oracle.com/mailman/listinfo/ocfs2-users
Re: [Ocfs2-users] Compiling ocfs2-tools-1.6.3 on slackware64-13.1
On 11/30/2010 07:47 PM, pica pica wrote: Some progress: I added -lpthread my build script (see bellow) and I got past fsck.ocfs2, but now get stuck at o2image :( It seems that -lpthread was not used here, but I could see that it was everywhere else. Is this right? make[1]: Entering directory `/root/ocfs2/ocfs2-tools/ocfs2-tools/tmp/SBo/ocfs2-tools-1.6.3/o2image' gcc -Wall -Wstrict-prototypes -Wno-format -Wmissing-prototypes -Wmissing-declarations-I../include -I. -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DVERSION=\1.6.3\ -MD -MP -MF ./.o2image.d -o o2image.o -c o2image.c gcc -Wall -Wstrict-prototypes -Wno-format -Wmissing-prototypes -Wmissing-declarations -o o2image o2image.o ../libocfs2/libocfs2.a -lglib-2.0 -L../libocfs2 -locfs2 -L/lib -lcom_err /lib/libcom_err.a(error_message.o): In function `et_list_unlock': error_message.c:(.text+0x1b0): undefined reference to `sem_post' /lib/libcom_err.a(error_message.o): In function `fini_et_lock': error_message.c:(.text+0x1ce): undefined reference to `sem_destroy' /lib/libcom_err.a(error_message.o): In function `setup_et_lock': error_message.c:(.text+0x1fe): undefined reference to `sem_init' /lib/libcom_err.a(error_message.o): In function `et_list_lock': error_message.c:(.text+0x22d): undefined reference to `sem_wait' collect2: ld returned 1 exit status make[1]: *** [o2image] Error 1 make[1]: Leaving directory `/root/ocfs2/ocfs2-tools/ocfs2-tools/tmp/SBo/ocfs2-tools-1.6.3/o2image' make: *** [o2image] Error 2 Edit o2image/Makefile and change CFLAGS = .. to CFLAGS += Here is my build script: #!/bin/sh # Slackware build script for ocfs2-tools # Copyright (c) 2010 Jose Lealpica6...@aeiou.pt # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following disclaimer # in the documentation and/or other materials provided with the # distribution. # * Neither the name of the {company} nor the names of its # contributors may be used to endorse or promote products derived from # this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=ocfs2-tools VERSION=1.6.3 BUILD=${BUILD:-1} TAG=${TAG:-_SBo} # Automatically determine the architecture we're building on: if [ -z $ARCH ]; then case $( uname -m ) in i?86) ARCH=i486 ;; arm*) ARCH=arm ;; # Unless $ARCH is already set, use uname -m for all other archs: *) ARCH=$( uname -m ) ;; esac fi CWD=$(pwd) TMP=./tmp/SBo #TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} if [ $ARCH = i486 ]; then SLKCFLAGS=-O2 -march=i486 -mtune=i686 LIBDIRSUFFIX= elif [ $ARCH = i686 ]; then SLKCFLAGS=-O2 -march=i686 -mtune=i686 LIBDIRSUFFIX= elif [ $ARCH = x86_64 ]; then SLKCFLAGS=-O2 -fPIC LIBDIRSUFFIX=64 else SLKCFLAGS=-O2 LIBDIRSUFFIX= fi set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $TMP/$PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1 cd $PRGNAM-$VERSION chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; CFLAGS=$SLKCFLAGS -lpthread \ CXXFLAGS=$SLKCFLAGS -lpthread \ ./configure \ --sbindir=/sbin \ --bin=/bin \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --datadir=/etc/ocfs2 \ --sharedstatedir=/var/ocfs2 \ --libexecdir=/usr/libexec \ --localstatedir=/var \ --mandir=/usr/man \ --build=$ARCH-slackware-linux make make install DESTDIR=$PKG find $PKG | xargs file | grep -e executable -e shared object| grep ELF | \ cut -f 1 -d : | xargs strip --strip-unneeded 2 /dev/null || true ( cd $PKG/usr/man find . -type f