Re: App release build crashes

2014-02-07 Thread Steve Teale

On Friday, 7 February 2014 at 07:43:05 UTC, Steve Teale wrote:
I was attempting to to build my app COMPO using a Makefile this 
morning, and at first this worked to some extent, but after 
some fiddling with compiler flags to make a release version 
that then had problems, I reverted to my original makefile as 
of yesterday. That builds and links the app, but when I run it 
I get


Fatal Error while loading 
'/usr/lib/i386-linux-gnu/libphobos2.so.0.64':

The module 'std.regex' is already defined in './compo'.

My Makefile has:

LFLAGS = -L-L/usr/lib/i386-linux-gnu -L-L/usr/local/lib 
-L-L/home/steve/COMPO -L-lusps4cb -L-lgtkd-2 -L-lrsvg 
-L-lphobos2 -L-ldl -L-lpthread -L-lm -L-lrt


compo: $(OBJFILES)
gcc -o compo $(OBJFILES) $(LFLAGS)

If I use static phobos2 -L-l:libphobos2.a, it runs OK. Building 
via CodeBlocks using phobos2 shared library works OK judging by 
the smaller executable size.


What is wrong with my linker flags?


Possibly nothing - I was using binutils-gold, and reverting to 
the Gnu linker fixed that.


However the version built with phobos shared crashes in use, and 
I have to delve into that before I can say where.




App release build crashes

2014-02-06 Thread Steve Teale
I was attempting to to build my app COMPO using a Makefile this 
morning, and at first this worked to some extent, but after some 
fiddling with compiler flags to make a release version that then 
had problems, I reverted to my original makefile as of yesterday. 
That builds and links the app, but when I run it I get


Fatal Error while loading 
'/usr/lib/i386-linux-gnu/libphobos2.so.0.64':

The module 'std.regex' is already defined in './compo'.

My Makefile has:

LFLAGS = -L-L/usr/lib/i386-linux-gnu -L-L/usr/local/lib 
-L-L/home/steve/COMPO -L-lusps4cb -L-lgtkd-2 -L-lrsvg -L-lphobos2 
-L-ldl -L-lpthread -L-lm -L-lrt


compo: $(OBJFILES)
gcc -o compo $(OBJFILES) $(LFLAGS)

If I use static phobos2 -L-l:libphobos2.a, it runs OK. Building 
via CodeBlocks using phobos2 shared library works OK judging by 
the smaller executable size.


What is wrong with my linker flags?