Solaris 10 x86 64 bit link problem

  • Permalink
  • submit to reddit
  • Email
  • Follow


This is a multi-part message in MIME format.
--------------050404020004040600000608
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

I posted a query about this some time back and now I've been reminded it 
  never got resolved.  Google just finds my original query here and 
SunSolve is comatose yet again.

I can link w/ -m32 from a library, but not w/ -m64.  The latter results 
in failures to find the library members.

This is Solaris 10 U6 x86 w/ Studio 12 on an Ultra 20.  Does anyone have 
any suggestions?  I searched SunSolve when I ran into this the first 
time, but can't recall what I did after that.

Thanks,
Reg

Here's a console log and example code to demonstrate the problem:

==> console.log <==

sun_x86%rhb {156} make clean
rm -f *.o *.a tst_a tst_b
sun_x86%rhb {157} make CFLAGS=-m32
cc -m32   -c -o foo.o foo.c
cc -m32   -c -o bar.o bar.c
cc -m32 -o tst_a tst.c foo.o bar.o
ar crv libfoo.a foo.o bar.o
a - foo.o
a - bar.o
ranlib libfoo.a
cc -m32 -o tst_b tst.c libfoo.a
sun_x86%rhb {158} make clean
rm -f *.o *.a tst_a tst_b
sun_x86%rhb {159} make CFLAGS=-m64
cc -m64   -c -o foo.o foo.c
cc -m64   -c -o bar.o bar.c
cc -m64 -o tst_a tst.c foo.o bar.o
ar crv libfoo.a foo.o bar.o
a - foo.o
a - bar.o
ranlib libfoo.a
cc -m64 -o tst_b tst.c libfoo.a
Undefined                       first referenced
  symbol                             in file
foo                                 tst.o
ld: fatal: Symbol referencing errors. No output written to tst_b
make: *** [tst_b] Error 1
sun_x86%rhb {160} uname -a
SunOS u20 5.10 Generic_137112-02 i86pc i386 i86pc
sun_x86%rhb {161} isainfo -kv
64-bit amd64 kernel modules
sun_x86%rhb {162} cc -V
cc: Sun C 5.9 SunOS_i386 Patch 124868-05 2008/05/13
usage: cc [ options] files.  Use 'cc -flags' for details
sun_x86%rhb {163} ld -V
ld: Software Generation Utilities - Solaris Link Editors: 5.10-1.489


==> Makefile <==

all: tst_a tst_b

libfoo.a : foo.o bar.o
         ar crv libfoo.a foo.o bar.o
         ranlib libfoo.a

tst_a : tst.c foo.o bar.o
         $(CC) $(CFLAGS) -o tst_a tst.c foo.o bar.o

tst_b : tst.o libfoo.a
         $(CC) $(CFLAGS) -o tst_b tst.c libfoo.a

clean:
         rm -f *.o *.a tst_a tst_b

==> bar.c <==

#include <stdio.h>

void bar(){

    printf( "bar\n" );

}

==> foo.c <==


void foo( int n, float* a ){

    int i;

    for( i=0; i<n; i++ ){

       a[i] *= a[i];
    }
}

==> tst.c <==

#include <stdio.h>

void foo( int n ,float* a );
void bar( void );

int main(){

    int i;
    int n = 256;

    float a[256];

    for( i=0; i<n; i++ ){
       a[i] = i;
    }

    printf( "%f \n" ,a[64] );

    foo( n ,a );

    printf( "%f \n" ,a[64] );

    bar();

}

--------------050404020004040600000608
Content-Type: text/plain;
 name="txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="txt"

==> console.log <==

sun_x86%rhb {156} make clean
rm -f *.o *.a tst_a tst_b
sun_x86%rhb {157} make CFLAGS=-m32
cc -m32   -c -o foo.o foo.c
cc -m32   -c -o bar.o bar.c
cc -m32 -o tst_a tst.c foo.o bar.o
ar crv libfoo.a foo.o bar.o
a - foo.o
a - bar.o
ranlib libfoo.a
cc -m32 -o tst_b tst.c libfoo.a
sun_x86%rhb {158} make clean
rm -f *.o *.a tst_a tst_b
sun_x86%rhb {159} make CFLAGS=-m64
cc -m64   -c -o foo.o foo.c
cc -m64   -c -o bar.o bar.c
cc -m64 -o tst_a tst.c foo.o bar.o
ar crv libfoo.a foo.o bar.o
a - foo.o
a - bar.o
ranlib libfoo.a
cc -m64 -o tst_b tst.c libfoo.a
Undefined                       first referenced
 symbol                             in file
foo                                 tst.o
ld: fatal: Symbol referencing errors. No output written to tst_b
make: *** [tst_b] Error 1
sun_x86%rhb {160} uname -a
SunOS u20 5.10 Generic_137112-02 i86pc i386 i86pc
sun_x86%rhb {161} isainfo -kv
64-bit amd64 kernel modules
sun_x86%rhb {162} cc -V
cc: Sun C 5.9 SunOS_i386 Patch 124868-05 2008/05/13
usage: cc [ options] files.  Use 'cc -flags' for details



==> Makefile <==

all: tst_a tst_b

libfoo.a : foo.o bar.o
	ar crv libfoo.a foo.o bar.o
	ranlib libfoo.a

tst_a : tst.c foo.o bar.o
	$(CC) $(CFLAGS) -o tst_a tst.c foo.o bar.o

tst_b : tst.o libfoo.a
	$(CC) $(CFLAGS) -o tst_b tst.c libfoo.a

clean:
	rm -f *.o *.a tst_a tst_b

==> bar.c <==

#include <stdio.h>

void bar(){

   printf( "bar\n" );

}

==> foo.c <==


void foo( int n, float* a ){

   int i;

   for( i=0; i<n; i++ ){

      a[i] *= a[i];
   }
}

==> tst.c <==

#include <stdio.h>

void foo( int n ,float* a );
void bar( void );

int main(){

   int i;
   int n = 256;

   float a[256];

   for( i=0; i<n; i++ ){
      a[i] = i;
   }

   printf( "%f \n" ,a[64] );

   foo( n ,a );

   printf( "%f \n" ,a[64] );

   bar();

}

--------------050404020004040600000608--
0
Reply Reginald 5/20/2009 9:52:28 PM

See related articles to this posting

comp.unix.solaris 25802 articles. 88 followers. Post

0 Replies
177 Views

Similar Articles

[PageSpeed] 8


Reply:

Similar Artilces:

64 bits solaris 64bits oracle linking problem
Can any one shed light on why am I getting following error message during linking. all executable in /usr/ccs/bin including as are 32 bits. Is this the cause of the problem ? The os is 64 bits (see below) isainfo -kv 64-bit sparcv9 kernel modules usr/ccs/bin/make -f ins_net_client.mk ntcontab.o ORACLE_HOME=/u01/app/oracle/product/9.2.0.1 (if [ "assemble" = "compile" ] ; then \ /u01/app/oracle/product/9.2.0.1/bin/gennttab > ntcontab.c ;\ cc -c ntcontab.c ;\ rm -f /u01/app/oracle/product/9.2.0.1/lib/ntcontab.o ;\ mv ntcontab.o /u01/app/oracle/product/9.2.0...

[ace-bugs] linking problem on Solaris (64 bit)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, can you help me with problem on linking libACE on Solaris (64 bits) Thank Vitezslav Kosina ACE VERSION: 5.4.1 HOST MACHINE and OPERATING SYSTEM: SunOS pressts1 5.9 Generic_112233-06 sun4u sparc SUNW,Ultra-250 TARGET MACHINE and OPERATING SYSTEM, if different from HOST: COMPILER NAME AND VERSION (AND PATCHLEVEL): cc: Sun C 5.5 Patch 112760-12 2004/07/20 CC: Sun C++ 5.5 Patch 113817-08 2004/04/13 CONTENTS OF $ACE_ROOT/ace/config.h [if you use a link to a platform- specific file, simply state which one]: #inclu...

Known 64 bit problem with Kerberos in Solaris 10 (u5)?
Tried to compile a *very* simple test program that uses Solaris Kerberos library to authenticate a user, but for some reason it always coredumps on my when compiled as a 64 bit binary. Works perfect as a 32 bit binary though... Anyone know if this is a known problem (ie: should I bother fighting Sun support for this issue or not? :-) - Peter dbx traceback: Misaligned read (mar): Attempting to read 8 bytes at address 0xffffffff7fffbe9c which is 1612 bytes above the current stack pointer stopped in get_ulong_attr_from_template at 0xffffffff5ad0d940 0xffffffff5ad0d940: get_ulong_attr_fro...

RE: [ace-bugs] linking problem on Solaris (64 bit)
Hi, > ACE VERSION: 5.4.1 Thanks for using the PRF form. Did you already try the x.4.2 release which you can obtain from http://deuce.doc.wustl.edu/Download.html? Where did you get this PRF template from? The question about the default.features file is added by me last week and is not in the x.4.1 release, I find this very strange. I think google is your friend here maybe try to add the following to your platform_macros.GNU file as a test: LDFLAGS += -Wl,-xarch=v9 I don't have access to a box with 64bit solaris, so this is a hard one to test for me. Rega...

RE: [ace-users] linking problem on Solaris (64 bit)
Hi, It doesn't make any sense to repost your question within 12 hours, mailing lists are best effort and you are now only wasting time and bandwith. Regards, Johnny Willemsen Remedy IT Leeghwaterstraat 25 2811 DT Reeuwijk The Netherlands www.theaceorb.nl / www.remedy.nl > Hello, > > can you help me with problem on linking libACE on Solaris (64 bits) > > Thank > > Vitezslav Kosina > > > ACE VERSION: 5.4.1 > > HOST MACHINE and OPERATING SYSTEM: > SunOS pressts1 5.9 Generic_112233-06 sun4u sparc SUNW,Ultra-250 &g...

64 bit ncrs driver missing from Solaris 10 b72 x86
Just installed Solaris 10 beta 72 on an AMD64 machine with Symbios Logic 53c875 SCSI adapter. At bootup it complains it cannot load the ncrs driver which is not surprising since there is no ncrs in /kernel/drv/amd64. Is this a known problem? Is there a place on the net which has all the known Solaris 10 problems listed? Thanks. -- Koef. In article <d5bde189.0412040943.656e8639@posting.google.com>, koef@xs4all.nl (Koef) writes: > Just installed Solaris 10 beta 72 on an AMD64 machine with Symbios > Logic 53c875 SCSI adapter. At bootup it complains it cannot load the > ncrs d...

Re: [ace-users] linking problem on Solaris (64 bit) #2
Hi > > ACE VERSION: 5.4.1 Thanks for using the PRF! > > > > HOST MACHINE and OPERATING SYSTEM: > > SunOS pressts1 5.9 Generic_112233-06 sun4u sparc SUNW,Ultra-250 > > > > TARGET MACHINE and OPERATING SYSTEM, if different from HOST: > > COMPILER NAME AND VERSION (AND PATCHLEVEL): > > cc: Sun C 5.5 Patch 112760-12 2004/07/20 > > CC: Sun C++ 5.5 Patch 113817-08 2004/04/13 > > > > CONTENTS OF $ACE_ROOT/ace/config.h [if you use a link to a platform- > > specific file, simply state which one]: > > #...

Problem building 64-bit python 2.6.2 on Solaris 10
Hi, I'm trying to build python 2.6.2 on Solaris 10 (SPARC 64), using Sun Studio 12, but I'm having a few problems getting a clean build. The python configure options are: with_gcc=no with_universal_archs=64-bit with_cxx_main="CC -m64" The first problem I'm having is _ssl.so not building: cc -m64 -xcode=pic32 -DNDEBUG -g -xs -xtarget=ultraT1 -xarch=sparcvis2 -m64 -mt -xcode=pic32 -xmemalign=8s -xpagesize=default -I. -I/opt/ws/dists/ Python-2.6.2/. /Include -I. -IInclude -I./Include -I/opt/db/include -I/opt/tcl8/ include -I/opt/ openssl/include -I/opt/gnu/include -I/op...

Will apache2, php5, mcrypt,etc run on solaris 10 x86 in 64 bit
Hi All, We are trying to get apache2 and php5 with support for mcrypt, mhash, gd, soap, gettext, imap, ftp, openssl, oracle, mysql, db4 curl work. We have struck a file discripter limit in 32 bit and we are wondering anyone has got this config running well in 64 bit. Has anyone had any success? Thanks, Terry In article <1153121820.007274.279450@i42g2000cwa.googlegroups.com>, terry.cullen@gmail.com wrote: > Hi All, > We are trying to get apache2 and php5 with support for mcrypt, mhash, > gd, soap, gettext, imap, ftp, openssl, oracle, mysql, db4 curl work. > We have struc...

Solaris 10 + Sun Studio 12 Pyrhon 2.4.4 64-bit build problem
I've been trying for days to build 64 bit python with Solaris 10 + Sun Studio 12. Can anyone helpl please. This is how I tried to do build: # ./configure --prefix=/opt/python2.4 --without-gcc --enable-shared checking MACHDEP... sunos5 checking EXTRAPLATDIR... checking for --without-gcc... yes checking for --with-cxx=<compiler>... no checking for c++... /opt/SUNWspro/bin/CC checking for C++ compiler default output file name... a.out checking whether the C++ compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for gcc... ...

[Matlab 2009a / Mac OS 10.6.4 / 64-bit] MEX linking problem; does not find std
I'm running Matlab 2009a in 64-bit mode on Mac OS 10.6.4. I am trying to compile/link a bunch of files, but for some reason, MEX does not appear to link against STD. Below the commands I run and the error I get: ================================== /Applications/MATLAB_R2009b.app/bin/mex -c CC=g++ CXX=g++ LD=g++ ARCH=maci64 CXXFLAGS\#'-O2 -g -I. -fPIC -D__STDC_CONSTANT_MACROS -m64 -o mexClientPopen2.mexmaci64.o' mexClientPopen2.cpp /Applications/MATLAB_R2009b.app/bin/mex -c CC=g++ CXX=g++ LD=g++ ARCH=maci64 CXXFLAGS\#'-O2 -g -I. -fPIC -D__STDC_CONSTANT_MACROS -m64 -o debug.mexma...

10gR2 64-bit On Solaris Operating System x86-64
Enterprise Edition Version 10gR2 64-bit On Solaris Operating System x86-64 Additional Info in the cert matrix says this is "Planned for December." Anybody know how this is looking? I would like to go there if it actually works. In article <1133372758.802921.30570@g49g2000cwa.googlegroups.com>, stellr <stellr@vt.edu> wrote: >Additional Info in the cert matrix says this is "Planned for December." >Anybody know how this is looking? I would like to go there if it >actually works. I'm not on the beta program, but the certication matrix now indicate...

Addition of 64 bit support for x86.miniroot to Solaris x86-platform
Hi All, I want to install and run 64-bit application on x86.miniroot (ram file system). What all uererland / kernel libraries are needed ? Do we need a saperate kernel ? Please point me to the resources where i can get such information. -Regards, Ameya "ameya_agnihotri" <ameyaagnihotri22@gmail.com> writes: >I want to install and run 64-bit application on x86.miniroot (ram file >system). The x86.miniroot does not contain any of the 64 bit runtime (kernel, libraries). The installer always runs in 32 bit mode for now. You don't have a 32 bit version of the progra...

Installation of 10.2.0.1 on Solaris 10/06 x86-64
Hi, has anybody installed 10.2.0.1. on Solaris 10/06 x86-464 yet? I tried to do so in an ssh session, with the DISPLAY forwarded to my PC: -------------------------------------------------------------------------------- oracle@nus001-rman ~/install-tmp/database $ ./runInstaller Starting Oracle Universal Installer... Checking installer requirements... Checking operating system version: must be 5.10. Actual 5.10 Passed Checking Temp space: must be greater than 250 MB. Actual 1832 MB Passed Checking swap space: must be greater than 500 MB. Actual 2...

Addition of 64 bit support for x86.miniroot to Solaris x86-platform #2
Hi, What are the userland / kernel libraries / files do i need so that i can install run x64 application in x86.miniroot Do we need to change certain configuration files? Do we need to replace the kernel itself? Or its not possible..? Please point me to the resources regarding the same (x64-support requirements) -Regards, Ameya new(Kernel_Engineer) wrote: > Hi, > What are the userland / kernel libraries / files do i need so that i > can install run x64 application in x86.miniroot > Do we need to change certain configuration files? > Do we need to replace the kernel itself? ...

Oracle released ( finally ) 10.2 on solaris 10 x86 ( 32 bit )
They have had the 64 bit version ( which requires an AMD cpu ) out for a while but looks like they just released the 32 bit version yesterday. So now you should be able to run Oracle 10.2 on solaris 10 x86 on any ( well any modern ) intel cpu in 32 bit mode. I guess this is maybe the final port of 10.2 to other platforms? Or is oracle still working on delivering anything else? Oracle's history of supporting the x86 sun operating systems has been pretty erratic, more of a now you see it now you don't type of thing. But the changes we have seen in the last year with oracle on solari...

10.2.0.3 now available for solaris 10 x86-64
I was close to giving up hope of seeing this patchset but it's available now ( I think it came out August 13th 2007 ). Hoping to see the 10.2.0.4 patchset for that environment come out "a whole lot closer" to the release date for 10.2.0.4 on other platforms than has been the case obviously for this patchset. Oracle also has "promised" that 11g release will be on solaris x86 so another thing to watch for is how much that release drags the release date for other platforms ( hpux, solaris sparc, aix, etc ). For many of us, oracle software on solaris x86 has been much of...

Upgrading 10.1.0.4 (on Solaris SPARC 64-bit) to 10.2
We currently have 10.1.0.4 (Enterprise) installed on Solaris SPARC (64-bit). I have started to look into upgrading to 10.2. Can I patch the existing 10.1.0.4? Or do I need to do a brand new install of 10.2 in another Oracle home? GeoPappas wrote: > We currently have 10.1.0.4 (Enterprise) installed on Solaris SPARC > (64-bit). I have started to look into upgrading to 10.2. > > Can I patch the existing 10.1.0.4? > > Or do I need to do a brand new install of 10.2 in another Oracle home? You need to read the docs. http://docs.oracle.com -- Daniel A. Morgan http://www.p...

Problem linking 32-bit lapack on linux 64-bit with intel fortran compiler
Hi everybody, I'm currently trying to compile lapack from source on jaunty 64 bits, but linking fails on first link with GNU ld. I followed lapack installation instructions so adapted my make.inc like the following: Compilation options: FORTRAN =3D ifort -implicitnone OPTS =3D -O2 DRVOPTS =3D $(OPTS) NOOPT =3D -g LOADER =3D ld LOADOPTS =3D --format=3Delf32-i386 -melf_i386 TIMER =3D INT_CPU_TIME (BLASLIB was also adapted, but the compile process doesn't even go that far) The first call to ld fails: ( cd INSTALL; make; ./testlsame; ./testslamch; \ ./testdlamch; ./test...

x86 64 bit solaris
Hi, I'm running a 32 bit application on x86 64 bit solaris 10 (AMD opteron). I'm wondering if the 32 bit application can make use of the 64 bit wide GPRs etc. or is it limited to 32 bit registers? Secondly, when I compile my application for 64 bit (CC option = -xarch=amd64) it just hangs in an 'addl' instruction. Do I need to compile with different math library (I just used -lm)? Thanks, "psp" <pradhan.pushkar@gmail.com> writes: >I'm running a 32 bit application on x86 64 bit solaris 10 (AMD >opteron). >I'm wondering if the 32 bit application...

ActiveTcl 8.4.10 for Solaris 10 (SPARC & x86-64) is now available!
Today ActiveState is announcing support for Solaris 10 for x86-64. I am happy to announce that ActiveTcl 8.4.10 for Solaris 10 for x86-64 is now available for free download from: http://www.ActiveState.com/Products/ActiveTcl/ This brings the number of free ActiveTcl platforms to six -- with the existing HP-UX, Linux, Mac OS X, Solaris and Windows free downloads. What is ActiveTcl? --------------------- ActiveTcl is ActiveState's quality-assured binary distribution of Tcl. Builds for HP-UX, Linux, Mac OS X, Solaris (SPARC and x86-64), and Windows are made freely vailable. ActiveTcl...

Solaris 10 x86 boot problems
Hello I've installed solaris 10 on a pc with 3 hdds. I set the first to be the boot hdd, but every time I reboot from the boot cd in the install procedure I get the following: "Can't find PBR" I then have to reinsert cd1 and select hdd as the software source, and not the cd, so that it will continue with install. I've installed it 3 times this way, trying different things. I know once finished, the entire solaris os is on the hdd, but it will not boot from hdd. Several Web sites have explained a few things, but none work. To me it sounds like the mbr (or equiva...

Solaris 10 x86 boot problem
Had a working system. Booted up fine but now it goes into grub, attempts to boot, displays sun copyright lines and then reboots and loops around. Grub entries are:- findroot (rootfs0,0,a) kernel /platform/i86pc/multiboot module /platform/i86pc/boot-archive Also, got an entry in grub for failsafe solaris boot and this boots up ok:- findroot (rootfs0,0,a) kernel /boot/multiboot kernel/unix -s module /boot/x86.miniroot-safe Its on a laptop and I've got a feeling the user may have been powering off without shutting down properly and that this has corrupt something. Anywa...

Problem in booting of solaris 10 on X86
On Sun, Oct 3, 2010 at 8:19 PM, Raja Shekar <rajashekar333@gmail.com> wrote: Hi all, I have tried to install Solaris 10 on X86 platform. When I reboot after completion of installation it went to infiniti loop saying the following two messages. Could anyone help to solve this issue without repeating installation. Cannot find /etc/mnttab cannot find /etc/svc/volatile cannot find /etc/dfs/sharetab In article <77778f5a-afc8-44da-8104-57b8fed368a7@i3g2000yql.googlegroups.com>, Raj <rajashekar333@gmail.com> wrote: > I have tried ...