Hi, libace-perl seems to use build compiler rather than the host compiler and hence fails to cross build. I've attempted to do a patch which fixes it, and I'm able to cross build it locally. It'd be really nice to get a review before I stem ahead and file a bug report. Patch is attached with the mail. Nilesh
diff --git a/debian/patches/cross.patch b/debian/patches/cross.patch new file mode 100644 index 0000000..9c2de6c --- /dev/null +++ b/debian/patches/cross.patch @@ -0,0 +1,75 @@ +--- a/acelib/Makefile ++++ b/acelib/Makefile +@@ -2,6 +2,7 @@ + false = 0 + RANLIB_NEEDED = true # default overridable in $(ACEDB_MACHINE)_DEF + AR_OPTIONS = rlu # default overridable in $(ACEDB_MACHINE)_DEF ++AR = ar + + RPCGEN_FLAGS = -I -K -1 + # -I -K -1 good for alpha +@@ -42,7 +43,7 @@ + ## Different platforms use CC or COMPILE.c + # (USEROPTS - see comments at top of file) + # +-CC = $(COMPILER) $(CFLAGS) $(CPPFLAGS) $(USEROPTS) $(IDIR) -D$(NAME) -c ++CC_compile = $(COMPILER) $(CFLAGS) $(CPPFLAGS) $(USEROPTS) $(IDIR) -D$(NAME) -c + COMPILE.c = $(COMPILER) $(CFLAGS) $(CPPFLAGS) $(USEROPTS) $(IDIR) -D$(NAME) -c + + ########################################################### +@@ -63,11 +64,11 @@ + ################## libraries ######################### + + libaceperl.a : $(FREE_OBJS) aceclientlib.o rpcace_clnt.o rpcace_xdr.o +- ar $(AR_OPTIONS) $@ $? ++ $(AR) $(AR_OPTIONS) $@ $? + if ( $(RANLIB_NEEDED) ) then ranlib $@; fi + + libfree.a : $(FREE_OBJS) +- ar $(AR_OPTIONS) libfree.a $? ++ $(AR) $(AR_OPTIONS) libfree.a $? + if ( $(RANLIB_NEEDED) ) then ranlib libfree.a; fi + + ######################################### +@@ -87,7 +88,7 @@ + LIBACE_OBJS = $(GENERIC_ACE_OBJS) $(GENERIC_ACE_NONGRAPH_OBJS) aceversion.o + + libace.a : $(LIBACE_OBJS) +- ar $(AR_OPTIONS) libace.a $? ++ $(AR) $(AR_OPTIONS) libace.a $? + if ( $(RANLIB_NEEDED) ) then ranlib libace.a; fi + + ###################################################### +@@ -106,7 +107,7 @@ + rpcace_sp.o: rpcace_sp.c rpcace_svc.c + + aceclientlib.o: aceclientlib.c rpcace.h +- $(CC) $(LDFLAGS) -c $< ++ $(CC_compile) $(LDFLAGS) -c $< + + RPC_CLIENT_OBJS = aceclientlib.o rpcace_clnt.o rpcace_xdr.o + RPC_SERVER_OBJS = rpcace_sp.o rpcace_xdr.o +@@ -114,7 +115,7 @@ + RPC_X_CLIENT_OBJS = xclient.o aceclientlib.o rpcace_clnt.o rpcace_xdr.o + + libacecl.a : aceclientlib.o rpcace_clnt.o rpcace_xdr.o +- ar $(AR_OPTIONS) libacecl.a $? ++ $(AR) $(AR_OPTIONS) libacecl.a $? + if ( $(RANLIB_NEEDED) ) then ranlib libacecl.a; fi + + ########################################################### +--- a/acelib/wmake/LINUX_DEF ++++ b/acelib/wmake/LINUX_DEF +@@ -15,9 +15,10 @@ + ##### following the explanations given in wmake/truemake ##### + ################################################################# + ++CC = gcc + NAME = LINUX +-COMPILER = gcc -g -Wall -O2 -DACEDB4 +-LINKER = gcc -g ++COMPILER = $(CC) -g -Wall -O2 -DACEDB4 ++LINKER = $(CC) -g + USEROPTS=-fPIC + + LIBS = -lm diff --git a/debian/patches/series b/debian/patches/series index 1baabf4..a794d09 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ parallel-ftbfs.patch defined_hash_array.patch libtirpc.patch hardening.patch +cross.patch diff --git a/debian/rules b/debian/rules index b017896..c3f5618 100755 --- a/debian/rules +++ b/debian/rules @@ -5,6 +5,8 @@ PACKAGE = $(shell dh_listpackages) TMP = $(CURDIR)/debian/$(PACKAGE) export DEB_BUILD_MAINT_OPTIONS=hardening=+all +include /usr/share/dpkg/buildtools.mk + %: dh $@ @@ -27,8 +29,9 @@ override_dh_auto_build: # Directory for the acebrowser CGI scripts (~username ok): [/usr/local/apache/cgi-bin/ace] # Directory does not exist. Shall I create it for you? [y] # Directory for the acebrowser HTML files and images (~username ok): [/usr/local/apache/htdocs/ace] - perl -e "print qq(3\ny\n$(CURDIR)/debian/$(PACKAGE)/etc/libace-perl\ny\n$(CURDIR)/debian/$(PACKAGE)/usr/lib/cgi-bin\ny\n$(CURDIR)/debian/$(PACKAGE)/usr/share/$(PACKAGE))" | $(PERL) Makefile.PL INSTALLDIRS=vendor - dh_auto_build -- OPTIMIZE="$(CFLAGS)" LD_RUN_PATH="" OTHERLDFLAGS="$(LDFLAGS)" + perl -e "print qq(3\ny\n$(CURDIR)/debian/$(PACKAGE)/etc/libace-perl\ny\n$(CURDIR)/debian/$(PACKAGE)/usr/lib/cgi-bin\ny\n$(CURDIR)/debian/$(PACKAGE)/usr/share/$(PACKAGE))" | $(PERL) Makefile.PL \ + INSTALLDIRS=vendor CC=$(CC) LD=$(CC) + dh_auto_build -- CC=$(CC) OPTIMIZE="$(CFLAGS)" LD_RUN_PATH="" OTHERLDFLAGS="$(LDFLAGS)" override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
Attachment:
signature.asc
Description: OpenPGP digital signature