Hello -- I am trying to compile (linker error, not compiler error) RODBC for R 2.9.2 on AIX 5.3 using gcc. I get the following error: gcc -maix64 -pthread -std=gnu99 -shared -Wl,-brtl -Wl,-G -Wl,-bexpall -Wl,-bnoentry -lc -L/usr/lib -L/usr/X 11R6/lib -L/usr/local/lib -L/opt/freeware/lib -L/opt/freeware/lib64 -o RODBC.so RODBC.o -lodbc -lm -L/usr/l ocal/builddir/lib -lR ld: 0711-738 ERROR: Input file /usr/lib/libodbc.so: XCOFF32 object files are not allowed in 64-bit mode. collect2: ld returned 8 exit status gmake: *** [RODBC.so] Error 1 ERROR: compilation failed for package 'RODBC' I would appreciate any help I can get in this regard. Thanks.
On Sat, 31 Oct 2009, Chuck White wrote:> Hello -- I am trying to compile (linker error, not compiler error) RODBC for R 2.9.2 on AIX 5.3 using gcc. I get the following error: > > gcc -maix64 -pthread -std=gnu99 -shared -Wl,-brtl -Wl,-G -Wl,-bexpall -Wl,-bnoentry -lc -L/usr/lib -L/usr/X > 11R6/lib -L/usr/local/lib -L/opt/freeware/lib -L/opt/freeware/lib64 -o RODBC.so RODBC.o -lodbc -lm -L/usr/l > ocal/builddir/lib -lR > ld: 0711-738 ERROR: Input file /usr/lib/libodbc.so: > XCOFF32 object files are not allowed in 64-bit mode. > collect2: ld returned 8 exit status > gmake: *** [RODBC.so] Error 1 > ERROR: compilation failed for package 'RODBC' > > I would appreciate any help I can get in this regard. Thanks.It looks simple: apparently you have a 64-bit R and a 32-bit ODBC library (and that's not an R issue, and we don't have enough to go on -- the posting guide does ask for 'at a minimum' information for good reasons). Surely /opt/freeware/lib64 should precede (and hence have priority over) /opt/freeware/lib? We don't know what linker you built gcc with -- some are clever enough to select libraries of the right architecture on e.g. Solaris, but I believe we've seen this before on (not so recent) versions of AIX. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
On Oct 31, 2009, at 1:13 PM, Chuck White wrote:> Hello -- I am trying to compile (linker error, not compiler error) > RODBC for R 2.9.2 on AIX 5.3 using gcc. I get the following error: > > gcc -maix64 -pthread -std=gnu99 -shared -Wl,-brtl -Wl,-G -Wl,- > bexpall -Wl,-bnoentry -lc -L/usr/lib -L/usr/X > 11R6/lib -L/usr/local/lib -L/opt/freeware/lib -L/opt/freeware/lib64 - > o RODBC.so RODBC.o -lodbc -lm -L/usr/l > ocal/builddir/lib -lR > ld: 0711-738 ERROR: Input file /usr/lib/libodbc.so: > XCOFF32 object files are not allowed in 64-bit mode. > collect2: ld returned 8 exit status > gmake: *** [RODBC.so] Error 1 > ERROR: compilation failed for package 'RODBC' > > I would appreciate any help I can get in this regard. Thanks.I don't have hands-on experience with AIX, but I am going to guess that you have a 32 bit version of unixODBC installed and that is what is being found on your system, raising the error. If you do have a 64 bit version installed, I believe that the path is /usr/lib64, rather than /usr/lib. So you perhaps need to adjust the library paths for the RODBC package configuration and/or if not yet installed, be sure to install a 64 bit version of unixODBC. Additional information is available in the RODBC package vignette, which is available online: http://cran.r-project.org/web/packages/RODBC/vignettes/RODBC.pdf See Appendix A for Installation information. BTW, for future reference, you might want to post to the R-sig-db list: https://stat.ethz.ch/mailman/listinfo/r-sig-db HTH, Marc Schwartz
I could compile RODBC on AIX 5.3/R-2.9.2. I set LDFLAGS to: export LDFLAGS="-L/usr/lib64 -L/opt/freeware/lib64 -L/usr/X11R6/lib" Earlier, I had some other paths which had 32-bit libraries as well. Obviously, I re-compiled R and all the other libraries using this flag. Prof. Ripley and Marc, thanks for your response. ---- Marc Schwartz <marc_schwartz at me.com> wrote:> On Oct 31, 2009, at 1:13 PM, Chuck White wrote: > > > Hello -- I am trying to compile (linker error, not compiler error) > > RODBC for R 2.9.2 on AIX 5.3 using gcc. I get the following error: