lua-users home
lua-l archive

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

2009/12/5 Sam Roberts <>:
> I still can't build because of PIC problems. I think that the .so
> isn't being linked right, maybe statically linked against
> liblua?

I've removed the -fpic flags because on Windows it gives me warning
saying that it is not needed:

ifeq ($(strip $(BUILD_LUA_DLL)), yes)
#  CFLAGS += -fpic

May be it should not be removed on Linux ?

Otherwise this is the final link command I get on linux (without
support for complex numbers):

gcc -shared -o .libs/ common.o math-types.o matrix.o
nlinfit_helper.o fdfsolver.o nlinfit.o lua-utils.o linalg.o integ.o
ode_solver.o ode.o random.o randist.o pdf.o cdf.o lua-gsl.o
lua-cplot.o  lua/src/liblua.a  agg-plot/libaggplot.a -lpthread -lagg
-lX11 -lpthread -lsupc++ -lgsl -lgslcblas -lm

and here the results of 'ldd'

ldd =>  (0x00fc0000) => /lib/tls/i686/cmov/ (0x00f4c000) => /usr/lib/ (0x00825000) => /usr/lib/ (0x00110000) => /usr/lib/ (0x0065a000) => /lib/tls/i686/cmov/ (0x0032c000) => /lib/ (0x002f1000) => /lib/tls/i686/cmov/ (0x00352000)
	/lib/ (0x00d6c000) => /usr/lib/ (0x00496000) => /lib/tls/i686/cmov/ (0x0030f000) => /usr/lib/ (0x00313000) => /usr/lib/ (0x00b91000)

so everything looks fine to me but I'm not a shared library guru...