> Bob Deblier ([EMAIL PROTECTED]) reports a bug with a severity of 1

> This shouldn't be too hard to fix by adding the -lsocket and -lnsl libraries.

Done.

> Furthermore the dynamic linking of libraries is wrong. You use the -G
> option, which is appropriate for Sun's compilers, but not for gcc.
> With gcc, you have to use the '-shared' option.

GCC documents -G for shared libraries, and people have been using that for
years.  But it's probably not worth figuring this out since -shared is
clearly preferred.

> Hence all shared libraries fail to build because with a missing 'main'
> symbol. When this happens, the make process just continues, instead of
> aborting with an error.

Hmm, that's an interesting effect.

> Maybe you should switch to building with libtool?

Nope. ;-)

> Anyway, I'd appreciate it if I could directions to fix these problems.

1. in src/interfaces/odbc/GNUmakefile, change

    SHLIB_LINK = $(filter -lm, $(LIBS))
to
    SHLIB_LINK = $(filter -lm -lnsl -lsocket, $(LIBS))

2. in src/Makefile.shlib, change

LINK.shared          = $(COMPILER) -G

into

ifndef cplusplus
  ifeq ($(GCC), yes)
    LINK.shared      = $(CC) -shared
  else
    LINK.shared      = $(CC) -G
  endif
else
  ifeq ($(GXX), yes)
    LINK.shared      = $(CXX) -shared
  else
    LINK.shared      = $(CXX) -G
  endif
endif

(Or just change the -G if you don't care about generality.)

-- 
Peter Eisentraut   [EMAIL PROTECTED]   http://funkturm.homeip.net/~peter


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to