logo       

Link failure on amd64: msg#00221

lang.perl.perl6.internals

Subject: Link failure on amd64

libnci.so fails to build on amd64/Linux because nci_test.o isn't
compiled with -fPIC, which is a requirement of assembling a shared
library on that platform. This came up once before and was fixed, but
seemingly it was undone on account of win32 and I hadn't noticed until
now. Some history follows.

An excerpt from
http://groups.google.com/groups?hl=en&lr=&c2coff=1&safe=off&selm=200405081141.i48BfAf04107%40thu8.leo.home:

Leopold Toetsch <lt@xxxxxxxxxx> wrote:
> Adam Thomason <thomason@xxxxxxxxxx> wrote:
>
> > It's not the library that's the trouble, it's the contained objects.
>
> The build rule shouldn't contain nci_test$(O) but just
>
> path/libnci$(SO) : nci_test.c
> $(LD) $(LD_SHARED) $(LIBNCI_DEF_FILE) ...
>
> No need to have a CC_SHARED with -fPIC (not yet).
>
> > Adam
>
> leo

But shortly thereafter, the following was committed with log message
"#30401 win32 building fix (libnci.dll)":
http://cvs.perl.org/cgi/cvsweb.cgi/parrot/config/gen/makefiles/root.in.diff?r1=1.222&r2=1.223

-$(LIBNCI_SO): $(SRC)/nci_test.c
+$(LIBNCI_SO): $(SRC)/nci_test$(O)
$(LD) $(LD_SHARED) ${ncilib_link_extra} $(LDFLAGS) \
- $(LD_OUT)$@ $(SRC)/nci_test.c
+ $(LD_OUT)$@ $(SRC)/nci_test$(O)

Clearly there are conflicting requirements here. Is a CC_SHARED
required after all?

Adam



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise