Hi. Just wanted to let you know I am getting close to packaging R for AIX in 64.bit mode. One comment - the libtool.m4 I see used is quite old. The one I have on my system is 2.4.6, and what I see in R says: I am hoping a new libtool will clean up most of the manual work now needed. # Which release of libtool.m4 was used? macro_version=2.2.6 macro_revision=1.3012 This may be all that is needed to cleanup what I am doing manually. working with gcc I have done the following for 64-bit building export OBJECT_MODE=64 export CFLAGS="-maix64 -O2" export FFLAGS="-maix64 -O2" export LDFLAGS="-lpthread" Note - it does not look as if LDFLAGS is actually being picked up, but maybe I had a typo. The first error I get is: Target "libunix.a" is up to date. gcc -std=gnu99 -I. -I../../src/include -I../../src/include -I/opt/buildaix/include -I/opt/include -DHAVE_CONFIG_H -mminimal-toc -I/opt/include -I/opt/buildaix/include -maix64 -O2 -L/usr/local/lib -DR_HOME='"/data/prj/cran/64/R-3.2.2"' -o Rscript ./Rscript.c gcc -std=gnu99 -Wl,-brtl -Wl,-bexpall -Wl,-bpT:0x100000000 -Wl,-bpD:0x110000000 -lc -Wl,-bE:../../etc/R.exp -L/usr/local/lib -o R.bin Rmain.o CommandLineArgs.o Rdynload.o Renviron.o RNG.o agrep.o apply.o arithmetic.o array.o attrib.o bind.o builtin.o character.o coerce.o colors.o complex.o connections.o context.o cum.o dcf.o datetime.o debug.o deparse.o devices.o dotcode.o dounzip.o dstruct.o duplicate.o edit.o engine.o envir.o errors.o eval.o format.o gevents.o gram.o gram-ex.o graphics.o grep.o identical.o inlined.o inspect.o internet.o iosupport.o lapack.o list.o localecharset.o logic.o main.o mapply.o match.o memory.o names.o objects.o options.o paste.o platform.o plot.o plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o qsort.o random.o raw.o registration.o relop.o rlocale.o saveload.o scan.o seq.o serialize.o sort.o source.o split.o sprintf.o startup.o subassign.o subscript.o subset.o summary.o sysutils.o times.o unique.o util.o version.o g_alab_her.o g_cntrlify.o g_fontdb.o g_her_glyph.o xxxpr.o `ls ../unix/*.o ../appl/*.o ../nmath/*.o` ../extra/bzip2/libbz2.a ../extra/pcre/libpcre.a ../extra/tre/libtre.a ../extra/xz/liblzma.a ../extra/intl/libintl.a -lgfortran -lm /opt/lib/gcc/powerpc-ibm-aix5.3.0.0/4.7.4/ppc64/libgcc.a -lz -lrt -ldl -lm -liconv ld: 0711-738 ERROR: Input file /lib/crt0.o: XCOFF32 object files are not allowed in 64-bit mode. This is repaired by adding the -maix64 flag again to the gcc comand used to link. The following steps - first cut/paste the original command, then add -maix64 root at x072:[/data/prj/cran/64/R-3.2.2]cd src/main root at x072:[/data/prj/cran/64/R-3.2.2/src/main]ran -lm /opt/lib/gcc/powerpc-ibm-aix5.3.0.0/4.7.4/ppc64/libgcc.a -lz -lrt -ldl -lm -liconv < ld: 0711-738 ERROR: Input file /lib/crt0.o: XCOFF32 object files are not allowed in 64-bit mode. collect2: error: ld returned 8 exit status root at x072:[/data/prj/cran/64/R-3.2.2/src/main] gcc -maix64 -std=gnu99 -Wl,-brtl -Wl,-bexpall -Wl,-bpT:0x100000000 -Wl,-bpD:0x110000000 -lc -Wl,-bE:../../> ld: 0711-415 WARNING: Symbol BM_norm_keep is already exported. ld: 0711-415 WARNING: Symbol LoadInitFile is already exported. ld: 0711-415 WARNING: Symbol N01_kind is already exported. ld: 0711-415 WARNING: Symbol R_ReadItemDepth is already exported. ld: 0711-224 WARNING: Duplicate symbol: BM_norm_keep ld: 0711-224 WARNING: Duplicate symbol: N01_kind ld: 0711-224 WARNING: Duplicate symbol: LoadInitFile ld: 0711-224 WARNING: Duplicate symbol: R_ReadItemDepth ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_lock ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_unlock collect2: error: ld returned 8 exit status root at x072:[/data/prj/cran/64/R-3.2.2/src/main] Now add the -lpthread gcc -maix64 -std=gnu99 -Wl,-brtl -Wl,-bexpall -Wl,-bpT:0x100000000 -Wl,-bpD:0x110000000 -lc -Wl,-bE:../../etc/R.exp -L/usr/local/lib -o R.bin Rmain.o Comma ndLineArgs.o Rdynload.o Renviron.o RNG.o agrep.o apply.o arithmetic.o array.o attrib.o bind.o builtin.o character.o coerce.o colors.o complex.o connections.o context.o cum.o dcf.o datetime.o debug.o deparse.o devices.o dotcode.o dounzip.o dstruct.o duplicate.o edit.o engine.o envir.o errors.o eval.o format.o gevent s.o gram.o gram-ex.o graphics.o grep.o identical.o inlined.o inspect.o internet.o iosupport.o lapack.o list.o localecharset.o logic.o main.o mapply.o match.o memory.o names.o objects.o options.o paste.o platform.o plot.o plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o qsort.o random.o raw.o regi stration.o relop.o rlocale.o saveload.o scan.o seq.o serialize.o sort.o source.o split.o sprintf.o startup.o subassign.o subscript.o subset.o summary.o sysuti ls.o times.o unique.o util.o version.o g_alab_her.o g_cntrlify.o g_fontdb.o g_her_glyph.o xxxpr.o `ls ../unix/*.o ../appl/*.o ../nmath/*.o` ../extra/bzip2/ libbz2.a ../extra/pcre/libpcre.a ../extra/tre/libtre.a ../extra/xz/liblzma.a ../extra/intl/libintl.a -lgfortran -lm /opt/lib/gcc/powerpc-ibm-aix5.3.0.0/4.7 .4/ppc64/libgcc.a -lz -lrt -ldl -lm -liconv -lpthread gcc -maix64 -std=gnu99 -Wl,-brtl -Wl,-bexpall -Wl,-bpT:0x100000000 -Wl,-bpD:0x110000000 -lc -Wl,-bE:../../etc/R.exp -L/usr/local/lib -o R.bin Rmain.o CommandLineArgs.o Rdynload.o Renviron.o RNG.o agrep.o apply.o arithmetic.o array.o attrib.o bind.o builtin.o character.o coerce.o colors.o complex.o connections.o context.o cum.o dcf.o datetime.o debug.o deparse.o devices.o dotcode.o dounzip.o dstruct.o duplicate.o edit.o engine.o envir.o errors.o eval.o format.o gevents.o gram.o gram-ex.o graphics.o grep.o identical.o inlined.o inspect.o internet.o iosupport.o lapack.o list.o localecharset.o logic.o main.o mapply.o match.o memory.o names.o objects.o options.o paste.o platform.o plot.o plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o qsort.o random.o raw.o registration.o relop.o rlocale.o saveload.o scan.o seq.o serialize.o sort.o source.o split.o sprintf.o startup.o subassign.o subscript.o subset.o summary.o sysutils.o times.o unique.o util.o version.o g_alab_her.o g_cntrlify.o g_fontdb.o g_her_glyph.o xxxpr.o `ls ../unix/*.o ../appl/*.o ../nmath/*.o` ../extra/bzip2/libbz2.a ../extra/pcre/libpcre.a ../extra/tre/libtre.a ../extra/xz/liblzma.a ../extra/intl/libintl.a -lgfortran -lm /opt/lib/gcc/powerpc-ibm-aix5.3.0.0/4.7.4/ppc64/libgcc.a -lz -lrt -ldl -lm -liconv -lpthread ld: 0711-415 WARNING: Symbol BM_norm_keep is already exported. ld: 0711-415 WARNING: Symbol LoadInitFile is already exported. ld: 0711-415 WARNING: Symbol N01_kind is already exported. ld: 0711-415 WARNING: Symbol R_ReadItemDepth is already exported. ld: 0711-224 WARNING: Duplicate symbol: BM_norm_keep ld: 0711-224 WARNING: Duplicate symbol: N01_kind ld: 0711-224 WARNING: Duplicate symbol: LoadInitFile ld: 0711-224 WARNING: Duplicate symbol: R_ReadItemDepth ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. Note: this is with 3.2.2 - with 3.1.3 I did not get the Duplicate symbols. (Using the same command in the 3.1.3 directory shows there are some other differences) root at x072:[/data/prj/cran/64/R-3.1.3/src/main]gcc -maix64 -std=gnu99 -Wl,-brtl -Wl,-bexpall -Wl,-bpT:0x100000000 -Wl,-bpD:0> gcc: error: g_alab_her.o: A file or directory in the path name does not exist. gcc: error: g_cntrlify.o: A file or directory in the path name does not exist. gcc: error: g_fontdb.o: A file or directory in the path name does not exist. gcc: error: g_her_glyph.o: A file or directory in the path name does not exist. so, since I am getting farther with 3.1.3 - I shall continue this INFORMATIONAL post. root at x072:[/data/prj/cran/64/R-3.1.3/src/main]rm R.bin root at x072:[/data/prj/cran/64/R-3.1.3/src/main]gcc -std=gnu99 -Wl,-brtl -Wl,-bexpall -Wl,-bpT:0x100000000 -Wl,-bpD:0x110000000 -lc -Wl,-bE:../../etc/R.exp -L/usr/l> ld: 0706-020 The number 0x100000000 is too large for the -b pT option. Use a value that is 4294967295 (hex FFFFFFFF) or less. ld: 0706-020 The number 0x110000000 is too large for the -b pD option. Use a value that is 4294967295 (hex FFFFFFFF) or less. collect2: error: ld returned 255 exit status root at x072:[/data/prj/cran/64/R-3.1.3/src/main]gcc -maix64 -std=gnu99 -Wl,-brtl -Wl,-bexpall -Wl,-bpT:0x100000000 -Wl,-bpD:0x110000000 -lc -Wl,-bE:../../etc/R.exp > ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_lock ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_unlock ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. collect2: error: ld returned 8 exit status root at x072:[/data/prj/cran/64/R-3.1.3/src/main]bm-aix5.3.0.0/4.7.4/ppc64/libgcc.a -lrt -ldl -lm -liconv -lpthread This is a kind of error that occurs frequently - the argument -shared causes "issues" Target "libRlapack.so" is up to date. /data/prj/cran/64/R-3.1.3/lib/libRlapack.so is unchanged gcc -std=gnu99 -shared -Wl,-brtl -Wl,-G -Wl,-bexpall -Wl,-bnoentry -lc -L/usr/local/lib -o lapack.so Lapack.o -L../../../lib -lRlapack -lgfortran -lm /opt/lib/gcc/powerpc-ibm-aix5.3.0.0/4.7.4/ppc64/libgcc.a ld: 0711-736 ERROR: Input file Lapack.o: XCOFF64 object files are not allowed in 32-bit mode. collect2: error: ld returned 8 exit status make: 1254-004 The error code from the last command is 1. changing -shared for -maix64 has "fixed" it up to now - Now however, back to duplicate symbols: gcc: error: Lapack.o: A file or directory in the path name does not exist. root at x072:[/data/prj/cran/64/R-3.1.3/src/modules]cd lapack root at x072:[/data/prj/cran/64/R-3.1.3/src/modules/lapack] gcc -std=gnu99 -shared -Wl,-brtl -Wl,-G -Wl,-bexpall -Wl,-bnoentry -lc -L/usr/local/lib -o lapack.so Lapac> ld: 0711-736 ERROR: Input file Lapack.o: XCOFF64 object files are not allowed in 32-bit mode. collect2: error: ld returned 8 exit status root at x072:[/data/prj/cran/64/R-3.1.3/src/modules/lapack]gcc -std=gnu99 -maix64 -Wl,-brtl -Wl,-G -Wl,-bexpall -Wl,-bnoentry -lc -L/usr/local/lib -o lapack.so Lapac> ld: 0711-224 WARNING: Duplicate symbol: p_xargc ld: 0711-224 WARNING: Duplicate symbol: p_xargv ld: 0711-224 WARNING: Duplicate symbol: p_xrcfg ld: 0711-224 WARNING: Duplicate symbol: p_xrc ld: 0711-224 WARNING: Duplicate symbol: end ld: 0711-224 WARNING: Duplicate symbol: .memcpy ld: 0711-224 WARNING: Duplicate symbol: memcpy ld: 0711-224 WARNING: Duplicate symbol: .bcopy ld: 0711-224 WARNING: Duplicate symbol: bcopy ld: 0711-224 WARNING: Duplicate symbol: .strcmp ld: 0711-224 WARNING: Duplicate symbol: strcmp ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. root at x072:[/data/prj/cran/64/R-3.1.3/src/modules/lapack] So, for today, my story ends with gcc -Wl,-bloadmap:aixtools -std=gnu99 -maix64 -Wl,-brtl -Wl,-G -Wl,-bexpall -Wl,-bnoentry -lc -L/usr/local/lib -o lapack.so Lapack.o -L../../../lib -lRlapack -lgfortran -lm /opt/lib/gcc/powerpc-ibm-aix5.3.0.0/4.7.4/ppc64/libgcc.a ld: 0711-228 WARNING: Duplicate symbols were found while resolving symbols. The following duplicates were found: Symbol Source-File(Object) OR Import-File{Shared-object} ------------------------- ------------------------------------------------- p_xargc crt0_64.s(/lib/crt0_64.o) ** Duplicate ** {../../../lib/libRlapack.so} p_xargv crt0_64.s(/lib/crt0_64.o) ** Duplicate ** {../../../lib/libRlapack.so} p_xrcfg crt0_64.s(/lib/crt0_64.o) ** Duplicate ** {../../../lib/libRlapack.so} p_xrc crt0_64.s(/lib/crt0_64.o) ** Duplicate ** {../../../lib/libRlapack.so} end crt0_64.s(/lib/crt0_64.o) ** Duplicate ** {../../../lib/libRlapack.so} .memcpy moveeq.s(/usr/lib/libc.a[moveeq_64.o]) ** Duplicate ** {../../../lib/libRlapack.so} memcpy moveeq.s(/usr/lib/libc.a[moveeq_64.o]) ** Duplicate ** {../../../lib/libRlapack.so} .bcopy moveeq.s(/usr/lib/libc.a[moveeq_64.o]) ** Duplicate ** {../../../lib/libRlapack.so} bcopy moveeq.s(/usr/lib/libc.a[moveeq_64.o]) ** Duplicate ** {../../../lib/libRlapack.so} .strcmp strcmp.s(/usr/lib/libc.a[strcmp_64.o]) ** Duplicate ** {../../../lib/libRlapack.so} strcmp strcmp.s(/usr/lib/libc.a[strcmp_64.o]) ** Duplicate ** {../../../lib/libRlapack.so} [[alternative HTML version deleted]]
On 15/10/2015 13:32, Michael Felt wrote:> Hi. > > Just wanted to let you know I am getting close to packaging R for AIX in > 64.bit mode.Which version? (You mentioned 3.1.3 and 3.2.2 far below.) There is little value in reporting on frozen branches, and most value in reporting on R-devel where all the current changes have been incorporated.> One comment - the libtool.m4 I see used is quite old. The one I have on my > system is 2.4.6, and what I see in R says:R-devel has 2.4.6 .> I am hoping a new libtool will clean up most of the manual work now needed.But libtool is hardly used in building R.> # Which release of libtool.m4 was used? > macro_version=2.2.6 > macro_revision=1.3012 > > This may be all that is needed to cleanup what I am doing manually. > > working with gcc I have done the following for 64-bit building > > export OBJECT_MODE=64 > export CFLAGS="-maix64 -O2" > export FFLAGS="-maix64 -O2"See the manual: flags such as -maix64 should be part of CC, not CFLAGS. That explains a lot of what was reported. Specifically, https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Essential-programs-and-libraries and https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#AIX . It is safer to put such things on the configure command line or in a config.site file (they will be found when updating if you do). [Lots of test output removed.] -- Brian D. Ripley, ripley at stats.ox.ac.uk Emeritus Professor of Applied Statistics, University of Oxford 1 South Parks Road, Oxford OX1 3TG, UK
aixtools
2015-Oct-18 19:06 UTC
[Rd] Building R for AIX in 32-bit mode - as preparation for building in 64-bit mode (changed subject!) - INFO/FEEDBACK - do not read as a bug report!
On 2015-10-15 15:02, Prof Brian Ripley wrote:> On 15/10/2015 13:32, Michael Felt wrote: >> Hi. >> >> Just wanted to let you know I am getting close to packaging R for AIX inrephrase - would like to be active in keeping R binaries current for AIX. My interest in not in R per se (rather a colleague who has a project that uses R, so I hope to assist him, and others like him).> > Which version? (You mentioned 3.1.3 and 3.2.2 far below.) There is > little value in reporting on frozen branches, and most value in > reporting on R-devel where all the current changes have been > incorporated.The reason for reporting old and current releases is to understand what is new between releases, and what has been around for "awhile". Note: in the future I shall edit all the "you cannot build, could not determine ... messages" - and as much as possible, shall focus on R-devel "packaging". I (attempt to) 'package' a lot of Opensource tools for AIX. Generally, the problems are not application code related (sometimes a function available on one platform, e.g. Linux, but not on AIX) - but most are, or can be resolved, with modifications via configure.ac, Makefile.in, etc.. Sincerely, Michael "Details"... When configure does complete - config.log starts with: It was created by R configure 3.1.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ ./configure --prefix=/opt --sysconfdir=/var/R/etc --sharedstatedir=/var/R/com --localstatedir=/var/R --mandir=/usr/share/man --infodir=/opt/share/info/R --with-readline=no --with-x=no As I see you are using a recent autoconf (and I shall guess a recent automake) I would like to try a more version of libtool and see if that corrects anything. However, even in R-devel I do not see, directly, how you are using these tools (some projects include either a setup.sh or a buildconf script to standardize how the project does this.) I am quite capable of just calling the tools in sequence, but would prefer to follow your procedure. I Starting again - fresh 3.1.3, 3.2.2 and R-devel - all in 32-bit mode, for the start. The goal is a 64-bit build so that memory management will be easier. This is my "standard command for building a package" CPPFLAGS="-I/opt/buildaix/include -I/opt/include" CFLAGS="-I/opt/include -I/opt/buildaix/include -O2" ./configure \ --prefix=/opt \ --sysconfdir=/var/R/etc \ --sharedstatedir=/var/R/com \ --localstatedir=/var/R \ --mandir=/usr/share/man \ --infodir=/opt/share/info/R --with-readline=no --with-x=no Results for 3.1.3 configure: WARNING: you cannot build PDF versions of the R manuals configure: WARNING: you cannot build PDF versions of vignettes and help pages configure: WARNING: you cannot build info or HTML versions of the R manuals configure: WARNING: I could not determine a browser configure: WARNING: I could not determine a PDF viewer configure: WARNING: you cannot build info or HTML versions of the R manuals configure: WARNING: you cannot build PDF versions of the R manuals configure: WARNING: you cannot build PDF versions of vignettes and help pages configure: WARNING: I could not determine a browser configure: WARNING: I could not determine a PDF viewer + make > .buildaix/make.out sys-std.c: In function 'Rstd_ChooseFile': sys-std.c:1186:5: warning: implicit declaration of function 'isspace' [-Wimplicit-function-declaration] connections.c: In function 'fifo_open': connections.c:885:5: warning: implicit declaration of function 'open' [-Wimplicit-function-declaration] main.c: In function 'dummy_ii': main.c:1594:5: warning: function returns address of local variable [enabled by default] ld: 0711-224 WARNING: Duplicate symbol: .memcpy ld: 0711-224 WARNING: Duplicate symbol: memcpy ld: 0711-224 WARNING: Duplicate symbol: .bcopy ld: 0711-224 WARNING: Duplicate symbol: bcopy ld: 0711-224 WARNING: Duplicate symbol: .strcmp ld: 0711-224 WARNING: Duplicate symbol: strcmp ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. Warning in solve.default(rgb) : unable to load shared object '/data/prj/cran/32/R-3.1.3/modules//lapack.so': rtld: 0712-001 Symbol logf was referenced from module /data/prj/cran/32/R-3.1.3/lib/libRlapack.so(), but a runtime definition of the symbol was not found. Error in solve.default(rgb) : LAPACK routines cannot be loaded Error: unable to load R code in package 'grDevices' Execution halted make: 1254-004 The error code from the last command is 1. ... Stop. make returned an error root at x072:[/data/prj/cran/32/R-3.1.3] ++++++ Notes: Last April I was successful with building R - I do not recall specifically how I changed the release. I shall determine what I did to get it to build normally. ++++++ Results for 3.2.2 configure: WARNING: you cannot build PDF versions of the R manuals configure: WARNING: you cannot build PDF versions of vignettes and help pages configure: WARNING: you cannot build info or HTML versions of the R manuals configure: WARNING: I could not determine a browser configure: WARNING: I could not determine a PDF viewer configure: WARNING: you cannot build info or HTML versions of the R manuals configure: WARNING: you cannot build PDF versions of the R manuals configure: WARNING: you cannot build PDF versions of vignettes and help pages configure: WARNING: I could not determine a browser configure: WARNING: I could not determine a PDF viewer + make > .buildaix/make.out sys-std.c: In function 'Rstd_ChooseFile': sys-std.c:1189:5: warning: implicit declaration of function 'isspace' [-Wimplicit-function-declaration] connections.c: In function 'fifo_open': connections.c:876:5: warning: implicit declaration of function 'open' [-Wimplicit-function-declaration] main.c: In function 'dummy_ii': main.c:1598:5: warning: function returns address of local variable [enabled by default] ld: 0711-415 WARNING: Symbol BM_norm_keep is already exported. ld: 0711-415 WARNING: Symbol LoadInitFile is already exported. ld: 0711-415 WARNING: Symbol N01_kind is already exported. ld: 0711-415 WARNING: Symbol R_ReadItemDepth is already exported. ld: 0711-224 WARNING: Duplicate symbol: LoadInitFile ld: 0711-224 WARNING: Duplicate symbol: BM_norm_keep ld: 0711-224 WARNING: Duplicate symbol: N01_kind ld: 0711-224 WARNING: Duplicate symbol: R_ReadItemDepth ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. ld: 0711-415 WARNING: Symbol BM_norm_keep is already exported. ld: 0711-415 WARNING: Symbol LoadInitFile is already exported. ld: 0711-415 WARNING: Symbol N01_kind is already exported. ld: 0711-415 WARNING: Symbol R_ReadItemDepth is already exported. ld: 0711-224 WARNING: Duplicate symbol: LoadInitFile ld: 0711-224 WARNING: Duplicate symbol: BM_norm_keep ld: 0711-224 WARNING: Duplicate symbol: N01_kind ld: 0711-224 WARNING: Duplicate symbol: R_ReadItemDepth ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. ld: 0711-224 WARNING: Duplicate symbol: .memcpy ld: 0711-224 WARNING: Duplicate symbol: memcpy ld: 0711-224 WARNING: Duplicate symbol: .bcopy ld: 0711-224 WARNING: Duplicate symbol: bcopy ld: 0711-224 WARNING: Duplicate symbol: .strcmp ld: 0711-224 WARNING: Duplicate symbol: strcmp ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. /bin/sh: There is no process to read data written to a pipe. Warning in solve.default(rgb) : unable to load shared object '/data/prj/cran/32/R-3.2.2/modules//lapack.so': rtld: 0712-001 Symbol logf was referenced from module /data/prj/cran/32/R-3.2.2/lib/libRlapack.so(), but a runtime definition of the symbol was not found. Error in solve.default(rgb) : LAPACK routines cannot be loaded Error: unable to load R code in package 'grDevices' Execution halted make: 1254-004 The error code from the last command is 1. ... make returned an error +++++ Here there are similiar - and new problems. The error re: rtld is usually a compiler (actually ld) flag error - a routine is expected to be exported in a shared object, but the object is still "static". I have seen this same problem with at least one R module. I still am unsure why some functions are being defined double - that info will come later root at x072:[/data/prj/cran/32/R-3.2.2] +++++>From R-devel_2015-10-17.tar.bz2configure: WARNING: you cannot build PDF versions of the R manuals configure: WARNING: you cannot build PDF versions of vignettes and help pages configure: WARNING: you cannot build info or HTML versions of the R manuals configure: WARNING: I could not determine a browser configure: WARNING: I could not determine a PDF viewer configure: error: bzip2 library and headers are required buildaix: ./configure ... returned an error try doing "grep configure: config.log | tail" for possible explanation try "./configure --help" for additional arguments to buildaix ++++ config.log configure: comments are ++++ configure:35647: checking bzlib.h presence configure:35647: gcc -E -I/opt/buildaix/include -I/opt/include conftest.c configure:35647: $? = 1 configure: failed program was: configure:35647: result: no configure:35647: checking for bzlib.h configure:35647: result: no configure:35712: checking whether bzip2 support suffices configure:35719: error: bzip2 library and headers are required configure: exit 1 ++++ ++++ Here is a completely new kind of "problem" - a demand for an include file. bzip2 is available, but configure is looking for it in a different way and now configure fails.> >> One comment - the libtool.m4 I see used is quite old. The one I have >> on my >> system is 2.4.6, and what I see in R says: > > R-devel has 2.4.6 . > >> I am hoping a new libtool will clean up most of the manual work now >> needed. > > But libtool is hardly used in building R. > >> # Which release of libtool.m4 was used? >> macro_version=2.2.6 >> macro_revision=1.3012 >> >> This may be all that is needed to cleanup what I am doing manually. >> >> working with gcc I have done the following for 64-bit building >> >> export OBJECT_MODE=64 >> export CFLAGS="-maix64 -O2" >> export FFLAGS="-maix64 -O2" > > See the manual: flags such as -maix64 should be part of CC, not > CFLAGS. That explains a lot of what was reported. > Specifically, > https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Essential-programs-and-libraries > and https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#AIX . > > It is safer to put such things on the configure command line or in a > config.site file (they will be found when updating if you do). > > [Lots of test output removed.] >
On 2015-10-15 15:02, Prof Brian Ripley wrote:> On 15/10/2015 13:32, Michael Felt wrote: >> Hi. >> >> Just wanted to let you know I am getting close to packaging R for AIX in >> 64.bit mode. > > Which version? (You mentioned 3.1.3 and 3.2.2 far below.) There is > little value in reporting on frozen branches, and most value in > reporting on R-devel where all the current changes have been > incorporated.This report is based on R-3.2.2 I shall repeat asap with R-devel and report any significant differences. compiler is: root at x072:[/data/prj/cran/64/R-3.2.2/src/main]gcc --version gcc (GCC) 4.7.4 Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. root at x072:[/data/prj/cran/64/R-3.2.2/src/main]gfortran --version GNU Fortran (GCC) 4.7.4 Copyright (C) 2012 Free Software Foundation, Inc. AIX level: root at x072:[/data/prj/cran/64/R-3.2.2/src/main]oslevel -s 7100-03-05-1524 Non-IBM filesets installed: root at x072:[/data/prj/cran/64/R-3.2.2/src/main]lslpp -L | grep aixtools aixtools.buildaix.man 2.0.1.0 C F man pages aixtools.buildaix.man.en_US aixtools.buildaix.rte 2.0.3.1 C F 1540 1007 2004 aixtools.gmp.rte 5.0.5.0 C F gmp version 5.0.5 for powerpc aixtools.gmp.share 5.0.5.0 C F gmp share and documentation aixtools.gnu.bash.man.en_US aixtools.gnu.bash.rte 4.3.42.0 C F 1537 0913 1505 aixtools.gnu.bash.share 4.3.42.0 C F universal pages aixtools.gnu.coreutils.rte aixtools.gnu.gettext.rte 0.19.5.0 C F 1531 0807 0000 aixtools.gnu.gettext.share aixtools.gnu.make.rte 4.1.0.0 C F 1523 0613 1158 aixtools.gnu.wget.man.en_US aixtools.gnu.wget.rte 1.16.3.0 C F 1530 0731 0651 aixtools.gnu.wget.share 1.16.3.0 C F universal pages aixtools.libiconv.man 1.14.0.0 C F built 1447 1127 1728 aixtools.libiconv.rte 1.14.0.0 C F libiconv 1447 1127 1728 aixtools.libiconv.share 1.14.0.0 C F built 1447 1127 1728 aixtools.mpc.rte 1.0.2.0 C F mpc 2014.Oct.31 15.44 CUT aixtools.mpc.share 1.0.2.0 C F share and documentation aixtools.mpfr.rte 2.4.2.0 C F mpfr 2014.Oct.31 15.19 CUT aixtools.mpfr.share 2.4.2.0 C F share and documentation aixtools.obj.gcc.man 4.7.4.0 C F man pages aixtools.obj.gcc.rte 4.7.4.0 C F 1515 0416 2134 aixtools.obj.gcc.share 4.7.4.0 C F universal pages aixtools64.gnu.libiconv.rte>> export OBJECT_MODE=64 >> export CFLAGS="-maix64 -O2" >> export FFLAGS="-maix64 -O2" > > See the manual: flags such as -maix64 should be part of CC, not > CFLAGS. That explains a lot of what was reported. > Specifically, > https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Essential-programs-and-libraries > and https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#AIX . > > It is safer to put such things on the configure command line or in a > config.site file (they will be found when updating if you do). >Not sure what you mean by a config.site file - perhaps what I use as a "setup.env" script. I followed the suggestion to move the flag -maix64 from CFLAGS and FFLAGS (where I think it belongs) to the compiler defintions. It does build better, but, still many concerns. Details - too many lines of duplicate symbol references to paste (not wishing to spam the list - for details see http://download.aixtools.net/test/R/R-3.2.2-main-nohup.out> [Lots of test output removed.] >The summary is: ld: 0711-318 ERROR: Undefined symbols were found. The following symbols are in error: Symbol Inpndx TY CL Source-File(Object-File) OR Import-File{Shared-object} RLD: Address Section Rld-type Referencing Symbol ---------------------------------------------------------------------------------------------- .pthread_mutex_lock [24] ER PR pcre_jit_compile.c(../extra/pcre/libpcre.a[pcre_jit_compile.o]) 000076f8 .text R_RBR [118] <.sljit_free_exec> 00007940 .text R_RBR [120] <.sljit_generate_code> 00028c30 .text R_RBR [230] .pcre_jit_free_unused_memory .pthread_mutex_unlock [26] ER PR pcre_jit_compile.c(../extra/pcre/libpcre.a[pcre_jit_compile.o]) 0000777c .text R_RBR [118] <.sljit_free_exec> 000079cc .text R_RBR [120] <.sljit_generate_code> 00007b94 .text R_RBR [120] <.sljit_generate_code> 00008038 .text R_RBR [120] <.sljit_generate_code> 00028cc4 .text R_RBR [230] .pcre_jit_free_unused_memory ER: The return code is 8. ld: 0711-415 WARNING: Symbol BM_norm_keep is already exported. ld: 0711-415 WARNING: Symbol LoadInitFile is already exported. ld: 0711-415 WARNING: Symbol N01_kind is already exported. ld: 0711-415 WARNING: Symbol R_ReadItemDepth is already exported. ld: 0711-224 WARNING: Duplicate symbol: BM_norm_keep ld: 0711-224 WARNING: Duplicate symbol: N01_kind ld: 0711-224 WARNING: Duplicate symbol: LoadInitFile ld: 0711-224 WARNING: Duplicate symbol: R_ReadItemDepth ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_lock ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_unlock collect2: error: ld returned 8 exit status The undefined sysbols can be resolved by adding -lpthread to the gcc command (and can be automated by adding that to LDFLAGS I expect, but imho - better if that gets caught by configure). It then ends with: RESOLVE: 6793 of 18448 symbols were kept. RESOLVE: The return code is 4. (ld): addgl /usr/lib/glink64.o ADDGL: Glink code added for 212 symbols. (ld): er full ER: There are no unresolved symbols. (ld): mismatch MISMATCH: No type mismatches exist. (ld): comprld COMPRLD: Kept 52596 of 52596 relocation entries. (ld): origin page 0x100000000 0x110000000 (ld): libpath /usr/local/lib:/opt/lib/gcc/powerpc-ibm-aix5.3.0.0/4.7.4/ppc64:/opt/lib/gcc/powerpc-ibm-aix5.3.0.0/4.7.4/../../../ppc64:/opt/lib/gcc/powerpc-ibm-aix5.3.0.0/4.7.4:/opt/lib/gcc/powerpc-ibm-aix5.3.0.0/4.7.4/../../..:/usr/lib:/lib LIBPATH: Library path set to /usr/local/lib:/opt/lib/gcc/powerpc-ibm-aix5.3.0.0/4.7.4/ppc64:/opt/lib/gcc/powerpc-ibm-aix5.3.0.0/4.7.4/../../../ppc64:/opt/lib/gcc/powerpc-ibm-aix5.3.0.0/4.7.4:/opt/lib/gcc/powerpc-ibm-aix5.3.0.0/4.7.4/../../..:/usr/lib:/lib (ld): save 1L . SAVE: Section sizes = 3374479+365673+669656 (0x337D8F+0x59469+0xA37D8 hex) SAVE: Size of TOC: 5208 (0x1458 hex) SAVE: No .loader section relocation entries exist for the .text section. (ld): rc RC: Highest return code was 4. ld: 0711-415 WARNING: Symbol BM_norm_keep is already exported. ld: 0711-415 WARNING: Symbol LoadInitFile is already exported. ld: 0711-415 WARNING: Symbol N01_kind is already exported. ld: 0711-415 WARNING: Symbol R_ReadItemDepth is already exported. ld: 0711-224 WARNING: Duplicate symbol: BM_norm_keep ld: 0711-224 WARNING: Duplicate symbol: N01_kind ld: 0711-224 WARNING: Duplicate symbol: LoadInitFile ld: 0711-224 WARNING: Duplicate symbol: R_ReadItemDepth a) There is still a non-zero status (rc=4) b) unhappy about all the duplications, even double exports
Maybe Matching Threads
- Building R for AIX in 64-bit mode
- Building R for AIX in 32-bit mode - as preparation for building in 64-bit mode (changed subject!) - INFO/FEEDBACK - do not read as a bug report!
- Building R for AIX in 32-bit mode - as preparation for building in 64-bit mode (changed subject!) - INFO/FEEDBACK - do not read as a bug report!
- Building R for AIX in 64-bit mode
- Assistance much appreciated