On 09/06/2012 18:35, Moritz Lenz wrote:
On 06/09/2012 05:59 PM, Nick Wellnhofer wrote:
On 09/06/2012 16:53, Moritz Lenz wrote:
On some Debian Testing systems, the linking of parrot fails:

cc -shared -O2 -L/usr/local/lib -fstack-protector -fPIC
-fstack-protector -L/usr/local/lib  -o blib/lib/libparrot.so.4.3.0
-Wl,-soname=libparrot.so.4.3.0 \
                  src/string/api.o src/ops/core_ops.o src/core_pmcs.o
...
compilers/imcc/pbc.o compilers/imcc/parser_util.o compilers/imcc/pcc.o
compilers/imcc/api.o -lnsl -ldl -lm -lcrypt -lutil -lpthread -lrt -lgmp
-lreadline  -lffi   -fPIE -pie -Wl,-z,relro -Wl,-z,now  -ldl -lm
                        ^^^^^^^^^^

I think it's the "pie" flags that have recently been added to Debian's
Perl. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657853

Sorry that I didn't mention it earlier, but my perl is a perlbrew'ed
perl 5.16, not installed by the package manager.

And on another system that is on Debian Stable I can build parrot just
fine with the same perl version.

Still, manually removing -pie from the Makefile, config_lib.pir and
lib/Parrot/Config/Generated.pm helped, the build succeeded.

So, what should we do about that?

The problem is that Parrot's build system defaults to Perl's compiler flags. I guess that's where the "pie" flags come from. For a quick fix, one could add some code to the build system that removes those flags. For a real solution, Parrot should provide it's own compiler flags. I started some work in this direction quite a while ago in branch nwellnhof/compiler_flags. But I didn't get much feedback and support, and this is something that has to be tested on all supported platforms.

Nick
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev

Reply via email to