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

Shared libraries



I'm pursuing the same problem I asked about last time,
but have identified that it is different than I thought.
I have the following program:

#include <stdio.h>

int
main(int argc, char *argv[]) {
  printf("Hello World\n\r");
  return 0;
}

I used the following makefile:

AXIS_USABLE_LIBS = GLIBC
include $(AXIS_TOP_DIR)/tools/build/Rules.axis

PROGS     = foo_uei

INSTDIR   = $(prefix)/bin
INSTMODE  = 0755
INSTOWNER = root
INSTGROUP = root

OBJS  = FOO_ALL.o

LDLIBS += -lstdc++

all:  $(PROGS)

$(PROGS): $(OBJS)
      $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $(PROGS)

install: $(PROGS)
      $(INSTALL) -d $(INSTDIR)
      $(INSTALL) -m $(INSTMODE) -o $(INSTOWNER) -g $(INSTGROUP) $(PROGS)
$(INSTDIR)

clean:
      rm *.o

#

After installing it is in /cris-axis-linux-gnu/bin.
I used boot_linux -f to get it into the Axis-82.
I used the ls -l to assure it was the latest.
When I execute it, this is what I get:

#/bin/foo_uei
foo_uei: error while loading shared libraries: libm.so.6: cannot load
shared object file: no such file or directory

I had thought it was a problem with the shared libraries
not getting transfered, but readelf-cris tells me that
libm.so.6 is not a needed lib for this.

Any idea where I blew it??

Frank Brown
Phoenix Consulting
for Emerson Climate Technology
fcb3@xxxxxxx.net