HDF5 (sci-libs/hdf5) on AMD64 needs LAM MPI (sys-cluster/lam-mpi) compiled with -fPIC in order to have parallel support.
Created attachment 55418 [details] 4450-hdf5-1.6.4.log /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3-20050110/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/liblammpio.a(close.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
Created attachment 55419 [details] lam-mpi-7.1.1.ebuild
Could you please attach a patch against the current ebuild rather than a full ebuild, using `diff -u`?
Created attachment 55434 [details, diff] lam-mpi-7.1.1.patch Sure I can. :-)
The proposed patch is not acceptable. lam-mpi builds several executables and also, a static library (in this case liblampio.a) should never be built with PIC. Instead we need a patch to create both a static and a shared version of mpiolib. The best way would probably be to libtoolize the buildsystem of romio/lib-mpio...
Comment on attachment 55434 [details, diff] lam-mpi-7.1.1.patch see comment #5
Comment on attachment 55419 [details] lam-mpi-7.1.1.ebuild see comment #5
Created attachment 58688 [details, diff] Enable build of liblammpio.so with PIC Attached patch work fine for me to a) build liblammpio.so b) compile HDF5-1.6.5 with USE="mpi" against lam-mpi-7.1.1 Donnie: May I commit ? Do you have contact to upstream ?
+ $(CC) $(CFLAGS) -fPIC -DPIC -c -o shared/$@ $< Seems like you should just be sticking the PIC stuff into a variable instead of tacking it on like this: SOCFLAGS, SHAREDLIBCFLAGS, whatever. I do have some contact with upstream, but they're working on openmpi now. 7.1.2 of lam-mpi is being worked on and will likely be the last release, ever. So if something needs to get upstream, better do it quick.
Created attachment 58973 [details, diff] Enable build of liblammpio.so with PIC Ok, new version of the patch for review. I added PICFLAGS for the objects and SOFLAGS for linking the shared object.
Patch commited for lam-mpi-7.1.1 and marked stable as well. This should fix this BUG.
Created attachment 59019 [details, diff] Enable build of liblammpio.so with PIC
>>> Unpacking source... >>> Unpacking lam-7.1.1.tar.bz2 to /var/tmp/portage/lam-mpi-7.1.1/work * Applying lam-mpi-7.1.1-shared-romio.patch ... * Failed Patch: lam-mpi-7.1.1-shared-romio.patch ! * ( /usr/portage/sys-cluster/lam-mpi/files/lam-mpi-7.1.1-shared-romio.patch ) * * Include in your bugreport the contents of: * * /var/tmp/portage/lam-mpi-7.1.1/temp/lam-mpi-7.1.1-shared-romio.patch-13929.out !!! ERROR: sys-cluster/lam-mpi-7.1.1 failed. !!! Function epatch, Line 358, Exitcode 0 !!! Failed Patch: lam-mpi-7.1.1-shared-romio.patch! !!! If you need support, post the topmost build error, NOT this status message.
Created attachment 59021 [details] lam-mpi-7.1.1-shared-romio.patch-22062.out Using patch in Attachment #59019 [details, diff] instead of the one in the tree works here.
HDF5 (sci-libs/hdf5) still can not be compiled with mpi support (mpi USE): Now the mpicc can not create executables... # emerge hdf5 Calculating dependencies ...done! >>> emerge (1 of 1) sci-libs/hdf5-1.6.4 to / >>> md5 files ;-) hdf5-1.6.2.ebuild >>> md5 files ;-) hdf5-1.6.4.ebuild >>> md5 files ;-) files/digest-hdf5-1.6.2 >>> md5 files ;-) files/digest-hdf5-1.6.4 >>> md5 src_uri ;-) hdf5-1.6.4.tar.gz >>> Unpacking source... >>> Unpacking hdf5-1.6.4.tar.gz to /var/tmp/portage/hdf5-1.6.4/work >>> Source unpacked. checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking shell variables initial values... done checking if tr works... yes checking if basename works... yes checking if xargs works... yes checking for cached host... none checking for sizeof hsize_t and hssize_t... large checking for config x86_64-unknown-linux-gnu... no checking for config x86_64-unknown-linux-gnu... no checking for config unknown-linux-gnu... no checking for config unknown-linux-gnu... no checking for config x86_64-linux-gnu... no checking for config x86_64-linux-gnu... no checking for config x86_64-unknown... no checking for config linux-gnu... found compiler '/usr/bin/mpicc' is GNU gcc-3.4.320050110 checking for config ./config/site-specific/host-avalancha... no checking for gcc... /usr/bin/mpicc checking for C compiler default output file name... configure: error: C compiler cannot create executables See `config.log' for more details. !!! ERROR: sci-libs/hdf5-1.6.4 failed. !!! Function src_compile, Line 43, Exitcode 77 !!! configure failed !!! If you need support, post the topmost build error, NOT this status message.
Created attachment 59023 [details] /var/tmp/portage/hdf5-1.6.4/work/hdf5-1.6.4/config.log
configure:2150: /usr/bin/mpicc -O2 -march=athlon64 -fomit-frame-pointer -pipe -std=c99 -pedantic -Wall -Wextra -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wno-long-long -Wfloat-equal -Wmissing-format-attribute -Wpadded -Wmissing-noreturn -Wpacked -Wdisabled-optimization -Wmultichar -Wendif-labels -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch conftest.c >&5 conftest.c:13: warning: function declaration isn't a prototype conftest.c: In function `main': conftest.c:13: warning: old-style parameter declaration /usr/lib64/liblammpio.so: undefined reference to `ADIOI_Malloc_request' /usr/lib64/liblammpio.so: undefined reference to `ADIOI_Get_eof_offset' /usr/lib64/liblammpio.so: undefined reference to `ADIOI_Ftable_max' /usr/lib64/liblammpio.so: undefined reference to `ADIOI_Reqtable_ptr' /usr/lib64/liblammpio.so: undefined reference to `ADIOI_Shfp_fname' /usr/lib64/liblammpio.so: undefined reference to `ADIO_Init' /usr/lib64/liblammpio.so: undefined reference to `ADIOI_DFLT_ERR_HANDLER' /usr/lib64/liblammpio.so: undefined reference to `ADIO_Close' /usr/lib64/liblammpio.so: undefined reference to `ADIO_Init_keyval' /usr/lib64/liblammpio.so: undefined reference to `ADIO_Set_shared_fp' /usr/lib64/liblammpio.so: undefined reference to `ADIOI_Set_lock' /usr/lib64/liblammpio.so: undefined reference to `ADIOI_Reqtable' /usr/lib64/liblammpio.so: undefined reference to `ADIOI_Free_fn' /usr/lib64/liblammpio.so: undefined reference to `ADIOI_Get_position' /usr/lib64/liblammpio.so: undefined reference to `ADIOI_Ftable_ptr' /usr/lib64/liblammpio.so: undefined reference to `ADIO_Open' /usr/lib64/liblammpio.so: undefined reference to `ADIOI_Reqtable_max' /usr/lib64/liblammpio.so: undefined reference to `ADIOI_Realloc_fn' /usr/lib64/liblammpio.so: undefined reference to `ADIOI_Get_byte_offset' /usr/lib64/liblammpio.so: undefined reference to `ADIOI_Datatype_iscontig' /usr/lib64/liblammpio.so: undefined reference to `ADIOI_End_call' /usr/lib64/liblammpio.so: undefined reference to `ADIO_Get_shared_fp' /usr/lib64/liblammpio.so: undefined reference to `ADIOI_Ftable' /usr/lib64/liblammpio.so: undefined reference to `ADIO_ResolveFileType' /usr/lib64/liblammpio.so: undefined reference to `ADIOI_Malloc_fn' collect2: ld returned 1 exit status
Ok, it seems we need ADI libraries also built as shared objects. I'll try to sit down tonight and add that to the patch. Sorry for all the inconvenience/borkage :-/
Danny: fixed?
Created attachment 65985 [details, diff] Enable build of liblammpio.so with PIC (includes ADIO objects now) Ok, new patch, new look... This one works fine for me, but that isn't really significant. Please test and report back.
Created attachment 65986 [details, diff] Enable build of liblammpio.so with PIC (includes ADIO objects now) Whoops, attached wrong version of the patch which had a small typo :-)
Fix is in CVS now as sys-cluster/lam-mpi-7.1.1-r3.