comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Makefile for external calls on Solaris 9 (64-bit)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Makefile for external calls on Solaris 9 (64-bit) [message #38782 is a reply to message #38781] Tue, 30 March 2004 01:09 Go to previous messageGo to previous message
bjwhitcher is currently offline  bjwhitcher
Messages: 4
Registered: March 2004
Junior Member
Michael Wallace <mwallace.removethis@swri.edu.invalid> wrote in message news:<106gm45g9rje7e2@corp.supernews.com>...
> What kind of errors do you see when you try to compile your code on
> Solaris? Knowing what to do is a little more complicated than including
> C_FLAGS, LD_FLAGS, etc. Can you provide an example of the makefile
> you're using?
>
> -Mike

Here is example output...

% make
gcc -O2 -Wall -fPIC -m64 -I/usr/local/idl_6.0/external -c
simpleExample.c
gcc -O2 -Wall -fPIC -m64 -I/usr/local/idl_6.0/external -c IDL_Load.c
IDL_Load.c: In function `IDL_Load':
IDL_Load.c:14: warning: missing braces around initializer
IDL_Load.c:14: warning: (near initialization for
`procedure_addr[0].funct_addr')
IDL_Load.c:18: warning: missing braces around initializer
IDL_Load.c:18: warning: (near initialization for
`function_addr[0].funct_addr')
ld -64 -G -o simpleExample.so\
simpleExample.o IDL_Load.o
ld: fatal: file /usr/ucblib/libucb.so: wrong ELF class: ELFCLASS32
ld: fatal: file /usr/lib/libresolv.so: wrong ELF class: ELFCLASS32
ld: fatal: file /usr/lib/libsocket.so: wrong ELF class: ELFCLASS32
ld: fatal: file /usr/lib/libnsl.so: wrong ELF class: ELFCLASS32
ld: fatal: file /usr/lib/libelf.so: wrong ELF class: ELFCLASS32
ld: fatal: File processing errors. No output written to
simpleExample.so
*** Error code 1 (ignored)

... I've added additional libraries like /usr/ucblib/sparcv9 and
/usr/lib/sparcv9, which gets rid of the linking problems but the code
fails in IDL...

% SIMPLEFUNCTION: Error loading sharable executable.
Symbol: IDL_Load, File = simpleExample.so
ld.so.1:
/usr/local/idl_6.0/bin/bin.solaris2.sparc64/idl:
fatal: /usr/ucblib/libucb.so.1: wrong ELF class:
ELFCLASS32

Example makefile...

IDL_DIR = /usr/local/idl_6.0
CC = gcc
CFLAGS =
C_FLAGS = -O2 -Wall -fPIC -m64 -I$(IDL_DIR)/external -c $(CFLAGS)
LD = ld
SHELL = /bin/sh
X_CFLAGS =
X_LD_FLAGS = -64 -G
LD_LIBS = -L /usr/ucblib/sparcv9 -L /usr/lib/sparcv9
SO_EXT = so


.c.o :
$(CC) $(C_FLAGS) $(X_CFLAGS) $*.c

simpleExample : simpleExample.$(SO_EXT)
@date

simpleExample.$(SO_EXT) : simpleExample.o IDL_Load.o
-$(LD) $(X_LD_FLAGS) $(LD_LIBS) -o simpleExample.$(SO_EXT)\
simpleExample.o IDL_Load.o

clean :
rm -f *.o *.so so_locations


cheers...
Brandon
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Generalized Hough Transform
Next Topic: Re: Finding the closest value in an array...

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:07:36 PDT 2025

Total time taken to generate the page: 0.00411 seconds