[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Shared library won't install

That doesn't do it.  

The rom_meta file is rewritten by make (it seems), but even if I manually
add AEMFunctions.so to this file (and the file exists in the target lib/
directory) I still get the same error.

- add AEMFunctions.so to rom_meta file
- run make images
- get error
- examine rom_meta file: AEMFunctions.so still there

So the file is providing the reference, but it doesn't seem to be noticed?


I've done some tweaking to make sure my library is being made and installed
correctly.  The library comes before the application in the devboard script,
so there's no doubt that it is available later.

Makescript for AEMFunctions.so:

include $(AXIS_TOP_DIR)/tools/build-R2_10_0/Rules.axis

SNIPDIR = $(AXIS_TOP_DIR)/libs/snippets

LIB       = AEMFunctions.so

OBJS      = AEMFunctions.o

LIBS=  $(AXIS_TOP_DIR)/libs/mini_lib/minilib.a

CC += -fpic
CC += -shared

#CFLAGS   += -fPIC
#CFLAGS   += -fpic -I.

all: AEMFunctions.so

$(LIB): $(OBJS)
	$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
	$(STRIP) $@

install: $(LIB)
	$(INSTALL) -m 0644 $(LIB) $(prefix)/lib
	$(INSTALL) -m 0644 AEMFunctions.a $(prefix)/lib
	$(INSTALL) -m 0644 AEMFunctions.h $(prefix)/include
	$(LN) -sf  $(AXIS_TOP_DIR)/libs/AEMFunctions/AEMFunctions.so

Makescript for aeminit (application that uses the AEMFunctions.so library)

include $(AXIS_TOP_DIR)/tools/build/Rules.axis

PROGS     = aeminit

INSTDIR   = $(AXIS_TOP_DIR)/target/cris-axis-linux-gnu/runtime/exec
INSTMODE  = 0755

OBJS = aeminit.o

LDLIBS += $(prefix)/lib/AEMFunctions.so
LDFLAGS += -Wl,-R/lib

LIBS= $(AXIS_TOP_DIR)/libs/mini_lib/minilib.a

all: $(PROGS)

	$(CC) $(LDFLAGS) -L/lib $^ $(LDLIBS) $(LIBS) -o $@

install: all

-----Original Message-----
From: owner-dev-etrax@xxxxxxx.com">mailto:owner-dev-etrax@xxxxxxx.com] On Behalf
Of tjue1@xxxxxxx.uk
Sent: Tuesday, October 11, 2005 10:46
To: John Bindby
Cc: dev-etrax@xxxxxxx.com
Subject: Re: Shared library won't install

Quoting John Bindby <john.bindby@xxxxxxx.se>:

> * tried copying the whatever.so manually to 
> target/cris-axis-linux-gnu/lib before 'make images' ?

Include the name of the ****.so in rom_meta file (in lib folder)


> Hi,
> Just a couple of obvious ones...:
> * do you include the static library in the SUBDIRS in toplevel 
> Makefile ?
> * tried: make cris-axis-linux-gnu, make, make install on the static 
> and seen that it gets written to 
> target/cris-axis-linux-gnu/lib/whatever
> ?
> * tried copying the whatever.so manually to 
> target/cris-axis-linux-gnu/lib before 'make images' ?
> Regards - John Bindby - Botech AB
> Mark Richards wrote:
> >I've converted a static library that I use in several applications
> to shared
> >and have begun the process of integrating it into my apps.  
> >
> >...
> >