[Pvfs2-users] Compiling PVFS 2.6.0 on Suse 10.1 PPC
Rob Ross
rross at mcs.anl.gov
Tue Dec 5 18:14:51 EST 2006
thanks for the summary and letting us know things are working! -- rob
Kirby Cliff wrote:
> That worked. Thanks for the help everyone!
>
> I wrote up a small procedure for the guys at work to build the modules and
> since everyone here contributed I will share it with you.
>
> Mods for compiling pvfs2 kernel modules on Suse 10.1 PPC (Apple Xserve
> PPC970),
>
> Had to add following 64-bit RPMs,
> rpm -i libgcc-64bit-4.1.0-25.ppc.rpm
> rpm -i libstdc++-64bit-4.1.0-25.ppc.rpm
> rpm -i libstdc++-devel-64bit-4.1.0-25.ppc.rpm
> rpm -i db-64bit-4.3.29-13.ppc.rpm
> rpm -i binutils-64bit-2.16.91.0.5-18.ppc.rpm
> rpm -i glibc-devel-64bit-2.4-31.1.ppc.rpm
> rpm -i glibc-locale-64bit-2.4-25.ppc.rpm
>
> Changed Makefile.in as follows,
>
> Index: Makefile.in
> ===================================================================
> RCS file: /projects/cvsroot/pvfs2/Makefile.in,v
> diff -u -N -r1.228 -r1.229
> --- Makefile.in 27 Nov 2006 19:51:03 -0000 1.228
> +++ Makefile.in 29 Nov 2006 22:06:27 -0000 1.229
> @@ -670,6 +670,7 @@
> $(ADMINTOOLS): %: %.o $(LIBRARIES)
> $(ADMINTOOLS_SERVER): %: %.o $(LIBRARIES) lib/libpvfs2-server.a
> $(KERNAPPS): %: %.o $(LIBRARIES)
> +$(KERNAPPSTHR): %: %.o $(LIBRARIES_THREADED)
>
> # target for building _just_ the statecomp tool
> #statecomp: $(STATECOMP)
>
> I set the $CC variable because for some reason the CFLAG does not get passed
> to the gcc linker,
> export CC="gcc -m64"
> export CFLAGS="-m64"
>
> Issued following configure line disabling the server because it will fail
> otherwise due to not having 64-bit db libraries installed,
>
> /configure --prefix=/opt/pvfs2 --with-kernel=/usr/src/linux-2.6.16.21-0.25
> --without-openssl --disable-server
>
> The rest is the regular stuff,
>
> #make kmod
> #make kmod_install
> #depmod
> #modprobe pvfs2
>
>
> On 12/4/06 5:50 PM, "Sam Lang" <slang at mcs.anl.gov> wrote:
>
>> Kirby,
>>
>> The following patch should fix the problem you're seeing. You
>> mentioned that you're using CVS...this has been committed to trunk,
>> but didn't make it into the 2.6 branch yet. We'll make sure that
>> happens soon. Sorry for the trouble.
>>
>> -sam
>>
>> Index: Makefile.in
>> ===================================================================
>> RCS file: /projects/cvsroot/pvfs2/Makefile.in,v
>> diff -u -N -r1.228 -r1.229
>> --- Makefile.in 27 Nov 2006 19:51:03 -0000 1.228
>> +++ Makefile.in 29 Nov 2006 22:06:27 -0000 1.229
>> @@ -670,6 +670,7 @@
>> $(ADMINTOOLS): %: %.o $(LIBRARIES)
>> $(ADMINTOOLS_SERVER): %: %.o $(LIBRARIES) lib/libpvfs2-server.a
>> $(KERNAPPS): %: %.o $(LIBRARIES)
>> +$(KERNAPPSTHR): %: %.o $(LIBRARIES_THREADED)
>>
>> # target for building _just_ the statecomp tool
>> #statecomp: $(STATECOMP)
>>
>> On Dec 4, 2006, at 4:58 PM, Kirby Cliff wrote:
>>
>>> When I have LDFLAGS set to "-m64" I get this message,
>>> ld: unrecognised emulation mode: 64
>>> Supported emulations: elf32ppclinux elf32ppc elf32ppcsim elf64alpha
>>> alpha
>>> armelf_linux armelf hppalinux elf_i386 i386linux elf64_ia64 m68kelf
>>> m68klinux elf64ppc elf_s390 elf64_s390 elf32_sparc sparclinux
>>> elf64_sparc
>>> sun4 elf_x86_64 ppcmacos
>>> make[3]: *** [/home/trip3/pvfs-2.6.0/src/kernel/linux-2.6/pvfs2.o]
>>> Error 1
>>> make[2]: *** [_module_/home/trip3/pvfs-2.6.0/src/kernel/linux-2.6]
>>> Error 2
>>> make[1]: *** [default] Error 2
>>> make: *** [just_kmod] Error 2
>>>
>>> I did not have any 'lib/libpvfs2-threaded.*' files created after the
>>> compilation so I guess the configure script somehow was set not to
>>> build
>>> threaded libraries but ' pvfs2-client-core-threaded' has
>>> dependencies for
>>> those libraries.
>>>
>>> After a make distclean I searched for any residual *.a or *.so
>>> files in the
>>> build tree but none existed.
>>>
>>> Here are the steps I took to get it to compile and link but I have not
>>> attempted to insmod the module until the threaded libraries issue is
>>> resolved.
>>>
>>> # make distclean
>>> # find . -name "*.a" --no results
>>> # ./configure --with-kernel=/usr/src/linux-2.6.16.21-0.25 --without-
>>> openssl
>>> --disable-server
>>> # make kmod
>>> ..
>>> /usr/bin/ld: cannot find -lpvfs2-threaded
>>> collect2: ld returned 1 exit status
>>> make: *** [src/apps/kernel/linux/pvfs2-client-core-threaded] Error 1
>>> # make kmod V=1
>>> ..
>>> gcc -m64 -o src/apps/kernel/linux/pvfs2-client-core-threaded -L
>>> /home/trip3/pvfs-2.6.0/lib -rdynamic
>>> src/apps/kernel/linux/pvfs2-client-core.o -lpvfs2-threaded -lpthread
>>> /usr/bin/ld: cannot find -lpvfs2-threaded
>>> collect2: ld returned 1 exit status
>>> make: *** [src/apps/kernel/linux/pvfs2-client-core-threaded] Error 1
>>>
>>> At this point I replaced '-lpvfs2-threaded' with '-lpvfs2' and
>>> reissued the
>>> gcc command,
>>> # gcc -m64 -o src/apps/kernel/linux/pvfs2-client-core-threaded -L
>>> /home/trip3/pvfs-2.6.0/lib -rdynamic
>>> src/apps/kernel/linux/pvfs2-client-core.o -lpvfs2 -lpthread
>>> #make kmod
>>> Building modules, stage 2.
>>> MODPOST
>>>
>>> Thoughts?
>>>
>>>
>>> On 12/4/06 4:31 PM, "Robert Latham" <robl at mcs.anl.gov> wrote:
>>>
>>>> On Mon, Dec 04, 2006 at 03:25:32PM -0600, Kirby Cliff wrote:
>>>>> I did not have the 64bit binutils installed. Unfortunately
>>>>> installing that
>>>>> did not fix my problem. I have been able to get a bit farther by
>>>>> unsetting
>>>>> the LDFLAGS and setting CC to "gcc -m64" but this is the error I
>>>>> get,
>>>> You needed to remove -m64 from LDFLAGS?
>>>>
>>>>> suse-fs3:/home/trip3/pvfs-2.6.0 # make kmod V=1
>>>>> for i in pvfs2-utils.c devpvfs2-req.c pvfs2-cache.c dcache.c
>>>>> file.c inode.c
>>>>> dir.c namei.c super.c pvfs2-mod.c pvfs2-bufmap.c symlink.c
>>>>> xattr.c acl.c
>>>>> xattr-trusted.c xattr-default.c waitqueue.c pvfs2-proc.c pvfs2-
>>>>> kernel.h
>>>>> pvfs2-dev-proto.h pvfs2-bufmap.h upcall.h downcall.h pvfs2-
>>>>> proc.h; do \
>>>>> if [ ! -f $i -a ! -L $i ] ; then \
>>>>> ln -s ../../.././src/kernel/linux-2.6/$i ;\
>>>>> fi ;\
>>>>> done
>>>>> make -C /usr/src/linux-2.6.16.21-0.25
>>>>> SUBDIRS=/home/trip3/pvfs-2.6.0/src/kernel/linux-2.6 modules
>>>>> rm -rf /home/trip3/pvfs-2.6.0/src/kernel/linux-2.6/.tmp_versions
>>>>> mkdir -p /home/trip3/pvfs-2.6.0/src/kernel/linux-2.6/.tmp_versions
>>>>> make -f scripts/Makefile.build
>>>>> obj=/home/trip3/pvfs-2.6.0/src/kernel/linux-2.6
>>>>> Building modules, stage 2.
>>>>> make -rR -f /usr/src/linux-2.6.16.21-0.25/scripts/Makefile.modpost
>>>>> scripts/mod/modpost -m -a -i /usr/src/linux-2.6.16.21-0.25/
>>>>> Module.symvers
>>>>> -I /home/trip3/pvfs-2.6.0/src/kernel/linux-2.6/Modules.symvers -o
>>>>> /home/trip3/pvfs-2.6.0/src/kernel/linux-2.6/Modules.symvers -s /
>>>>> dev/null
>>>>> vmlinux /home/trip3/pvfs-2.6.0/src/kernel/linux-2.6/pvfs2.o
>>>> this all looks ok
>>>>
>>>>> gcc -m64 -o src/apps/kernel/linux/pvfs2-client-core-threaded -L
>>>>> /home/trip3/pvfs-2.6.0/lib -rdynamic
>>>>> src/apps/kernel/linux/pvfs2-client-core.o -lpvfs2-threaded -
>>>>> lpthread
>>>>> /usr/bin/ld: cannot find -lpvfs2-threaded
>>>>> collect2: ld returned 1 exit status
>>>>> make: *** [src/apps/kernel/linux/pvfs2-client-core-threaded] Error 1
>>>> What might have happened here is that the libpvfs2-threaded.a (or
>>>> libpvfs2-threaded.so, if you built with shared libraries) was
>>>> built in
>>>> 32 bit mode, but a 'make clean' didn't get rid of it. We've fixed
>>>> this in CVS, but in the meantime, remove 'lib/libpvfs2-threaded.*'
>>>> and
>>>> anything that looks like '*-threaded.o' left behind after a 'make
>>>> clean'. Rebuild and you should get back on track.
>>>>
>>>> ==rob
>>>
>>> _______________________________________________
>>> Pvfs2-users mailing list
>>> Pvfs2-users at beowulf-underground.org
>>> http://www.beowulf-underground.org/mailman/listinfo/pvfs2-users
>>>
>
>
> _______________________________________________
> Pvfs2-users mailing list
> Pvfs2-users at beowulf-underground.org
> http://www.beowulf-underground.org/mailman/listinfo/pvfs2-users
>
More information about the Pvfs2-users
mailing list