Hi,

I'm trying to build my program in L4/Fiasco. This program requires libtiff, MPI, and libstep library. I've ported those all libraries. But, when I built my program, I got a problem in linking program. The compilation just work fine but when entering the linking part, I got this error message:

==> Linking sobel-step
........
main-sobel-V4.cpp_processed.o: In function `main':
/home/l4re-mpich/src/l4/pkg/sobel-step/server/src/main-sobel-V4.cpp_processed.c:57: undefined reference to `__assert_fail'
/home/l4re-mpich/src/l4/pkg/sobel-step/server/src/main-sobel-V4.cpp_processed.c:56: undefined reference to `__assert_fail'
.........

This "__assert_fail" should be available in libstep.so and I've put the LDFLAGS = -lstep on my makefile. Here is my Makefiel anyway:

PKGDIR          ?= ../..
L4DIR           ?= $(PKGDIR)/../..
SYSTEMS          =  x86-l4f amd64-l4f
include $(L4DIR)/mk/Makeconf

ifneq ($(SYSTEM),)
  # check whether used gcc has the omp.h file available
  OMP_H_PATH := $(shell $(CC) -print-file-name=include/omp.h)

  ifeq ($(strip $(OMP_H_PATH)),include/omp.h)
    $(info  $(CC) does not have omp.h header file available, skipping.)
  else
    TARGET        = $(if $(filter 4.2 4.3 4.4 4.5 4.6 4.7,$(GCCVERSION)),sobel-step)
    REQUIRES_LIBS = libgomp libtiff libmpich libmpich_f77sup libstep libc libc_support_misc
  endif
endif

SRC_C   = main-sobel-V4.cpp_processed.c sobel-omp-V4.cpp_processed.c pictureInterface.c util.c
CFLAGS  += -fopenmp -I. -g -Wall
LDFLAGS += -rpath -ltiff -rpath -lstep

PRIVATE_INCDIR  = $(SRC_DIR)

vpath %.c $(SRC_DIR)

include $(L4DIR)/mk/prog.mk

Previously I compiled the program and there are so much missing shared libraries and the debug message suggested to add the -rpath. I updated my LDFLAGS by adding the -rpath. Here is the error message before I add the LDFLAGS with -rpath:

 ==> Linking sobel-step
....
ld: warning: libl4z.so, needed by /home/l4re-mpich/obj/l4/x86/lib/x86_586/l4f/libtiff.so, not found (try using -rpath or -rpath-link)
ld: warning: libgfortran.so, needed by /home/l4re-mpich/obj/l4/x86/lib/x86_586/l4f/libstep.so, not found (try using -rpath or -rpath-link)
.......
ld: final link failed: Bad value

I'm not sure whether this is causing another problem by adding the -rpath. I mean, Is it the proper way to fix the missing shared library? Because the "__asser_fail" is supposed to be found in the libstep.so but I still got the undefined reference error message. So perhaps there are several things to wrap up this linking problem. If you by any chance find any misplace or missing configuration in my makefile or you have any idea how to fix it please let me know. Thanks

Regards,
Irvanda