Hi Stuart, let's try if spec file itself could help me....
On Wed, Jan 25, 2012 at 7:40 PM, Stuart Hughes <[email protected]> wrote:
> **
> Hi Andy,
>
> Depending on the package, it may or maynot be cross compiler aware. The
> section you need to look at is where it is building the executable that
> it's trying to run.
>
> If you determine the package is not cross compiler aware you need to
> either:
>
> - Put fixes in for this in configure/Makefiles or;
> - Ask the maintainer of the package about it
> - Or prevent that section running and somehow generate the output/test
> results that it would make had it been run in a non-cross environment.
>
> Regards, Stuart
>
>
> On 25/01/12 05:57, Andy Yew wrote:
>
> Dear Stuart,
>
> I forgot to Reply All in previous email and thus didn't put it on the
> mailing list.... (newbie of mailing list actually)
>
> In previous email, you've mentioned about Makefile(s) that might contain
> "hostcc" and "buildcc", but i couldn't find it. Let me attach the Makefile
> here and also i extract the top part of it:
> ########################################
> #export STP_MODULE_PATH =
> $(top_builddir)/src/main/.libs:$(top_builddir)/src/main
> #export STP_DATA_PATH = $(top_srcdir)/src/xml
>
>
>
> pkgdatadir = $(datadir)/gutenprint
> pkgincludedir = $(includedir)/gutenprint
> pkglibdir = $(libdir)/gutenprint
> pkglibexecdir = $(libexecdir)/gutenprint
> am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
> install_sh_DATA = $(install_sh) -c -m 644
> install_sh_PROGRAM = $(install_sh) -c
> install_sh_SCRIPT = $(install_sh) -c
> INSTALL_HEADER = $(INSTALL_DATA)
> transform = $(program_transform_name)
> NORMAL_INSTALL = :
> PRE_INSTALL = :
> POST_INSTALL = :
> NORMAL_UNINSTALL = :
> PRE_UNINSTALL = :
> POST_UNINSTALL = :
> build_triplet = i686-pc-linux-gnu
> host_triplet = arm-unknown-linux-gnu
> DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
> $(top_srcdir)/scripts/global.mk
> noinst_PROGRAMS = extract-strings$(EXEEXT)
> subdir = src/xml
> ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
> am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
> $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/isc-posix.m4 \
> $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
> $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
> $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
> $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
> $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
> $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/stp.m4 \
> $(top_srcdir)/m4/stp_cups.m4 $(top_srcdir)/m4/stp_gimp.m4 \
> $(top_srcdir)/m4/stp_option.m4 $(top_srcdir)/m4/stp_release.m4 \
> $(top_srcdir)/configure.ac
> am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
> $(ACLOCAL_M4)
> mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
> CONFIG_HEADER = $(top_builddir)/config.h
> CONFIG_CLEAN_FILES =
> CONFIG_CLEAN_VPATH_FILES =
> PROGRAMS = $(noinst_PROGRAMS)
> am_extract_strings_OBJECTS = extract-strings.$(OBJEXT)
> extract_strings_OBJECTS = $(am_extract_strings_OBJECTS)
> extract_strings_DEPENDENCIES = $(GUTENPRINT_LIBS)
> DEFAULT_INCLUDES = -I. -I$(top_builddir)
> depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
> am__depfiles_maybe = depfiles
> am__mv = mv -f
> COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
> $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
> LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
> --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
> $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
> CCLD = $(CC)
> LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
> --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
> $(LDFLAGS) -o $@
> SOURCES = $(extract_strings_SOURCES)
> DIST_SOURCES = $(extract_strings_SOURCES)
> ##############################################
>
> This program (Gutenprint) has multiple Makefile for different modules of
> the program. So, the error part of it is a sub-folder
> (gutenprint-5.2.8/src/xml/) and the main program that caused the problem is
> the ./extrac-strings which is compiled during the building process and run
> to generate some data files. Here's the log extract when error occurs:
> ##############################################
> gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -Wall
> -Wcast-align -Wstrict-prototypes -Wmissing-prototypes
> -Wmissing-declarations -Wnested-externs -Wwrite-strings
> -Werror-implicit-function-declaration -Winline -Wformat=2
> -finline-limit=131072 -Disfinite=finite -O6 -MT extract-strings.o -MD
> -MP -MF .deps/extract-strings.Tpo -c -o extract-strings.o extract-strings.c
> mv -f .deps/extract-strings.Tpo .deps/extract-strings.Po
> /bin/bash ../../libtool --tag=CC --mode=link gcc -Disfinite=finite
> -O6 -o extract-strings extract-strings.o ../../src/main/libgutenprint.la
>
> gcc -Disfinite=finite -O6 -o .libs/extract-strings extract-strings.o
> ../../src/main/.libs/libgutenprint.so -lm
> creating extract-strings
> ./extract-strings `cat xml-stamp | sed -e 's;^;./;'` > xmli18n-tmp.h.tmp
> ./extract-strings: line 119:
> /home/hongjet-vm1/ltib/rpm/BUILD/gutenprint-5.2.3/src/xml/.libs/lt-extract-strings:
> cannot execute binary file
> ./extract-strings: line 119:
> /home/hongjet-vm1/ltib/rpm/BUILD/gutenprint-5.2.3/src/xml/.libs/lt-extract-strings:
> Success
> make[4]: *** [xmli18n-tmp.h] Error 1
> make[4]: Leaving directory
> `/home/hongjet-vm1/ltib/rpm/BUILD/gutenprint-5.2.3/src/xml'
> ###############################################
>
> As you can see here, initially it cannot execute the binary file, then it
> seems to have 2nd attempt to execute it and Success followed. However, when
> it tries to generate that "xmli18n-tmp.h" file, Error 1 came in...
>
> From the Makefile and Error Log attached here, could anyone tells if this
> program is cross-compiler aware and i have the luck to cross-compile it
> with LTIB??
>
> Thanks again!!
> Andy
>
>
> On Tue, Jan 24, 2012 at 11:49 PM, Stuart Hughes <[email protected]> wrote:
>
>> Hi Andy,
>>
>> Unless you keep questions on the list, I won't answer (and no one else
>> can).
>>
>> You need to look at configure, not the other automake scripts. You
>> should not need to run automake, you should use configure as-is.
>>
>> grep -l BUILDCC
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/*/*.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/asterisk/asterisk-cf.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/asterisk/asterisk.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/bash/bash.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/binutils/binutils.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/busybox/busybox-1.1.3.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/busybox/busybox.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/cpio/cpio.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/cpufrequtils/cpufrequtils.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/e2fsprogs/e2fsprogs.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/fontconfig/fontconfig.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/gdb/gdb-4.2.187.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/gdb/gdb-4.3-74.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/gdb/gdb-6.6.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/gdb/gdb.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/glibc/glibc-2.3.2.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/glibc/glibc.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/gmp/gmp.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/iproute/iproute.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/libedit/libedit.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/libgpg-error/libgpg-error.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/libXt/libXt.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/linux-atm/linux-atm.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/linux-wlan/linux-wlan.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/man/man.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/microwindows/microwindows-nommu.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/microwindows/microwindows.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/modutils/modutils.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/mpfr/mpfr.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/mplayer/mplayer.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/ncurses/ncurses.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/openswan/openswan-2.4.12.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/openswan/openswan.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/pcre/pcre.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/schedutils/schedutils.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/tc-wrapper/tc-wrapper.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/texinfo/texinfo.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/timezone/timezone.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot-tools/u-boot-tools.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-1.1.3-mpc8349eamds.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-1.1.3-mpc8349emds.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-1.1.3-mpc8349itx.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-1.1.3-mpc8360epb-rev2.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-1.1.3-mpc8360epb.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-1.1.6-mpc8360epb.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-1.2.0-mcf5445x.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-1.2.0-mpc5121ads.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-1.2.0-mpc8360epb-rev2.1.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-1.2.0-mpc8360epb-rev2.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-1.2.0.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-1.3.0-mpc837xemds.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-1.3.0-mpc837xerdb.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-1.3.0-mpc8548cds.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-1.3.0-mpc8641hpcn.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-1.3.1-20080123.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-1.3.2-m547x_8x.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-1.3.2-mpc5121.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-1.3.2.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-1.3.3-mpc837xerdb.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-1.3-rc3-uClinux.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-2008.10-mpc5121.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-2009.03-rc1-mpc8536ds.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-2009.11-lpc31xx.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-8xx.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-fsl-mpc7448.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-fsl-pq3.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-mpc5200.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot-mpclite5200b.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/u-boot/u-boot.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/uclibc/uclibc-0.9.27.spec
>>
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/uclibc/uclibc-nommu.spec
>> /home/stuart/Personal/Src/sv_pristine/dist/lfs-5.1/uclibc/uclibc.spec
>>
>> Regards, Stuart
>>
>>
>>
>>
>> On 24/01/12 12:39, Andy Yew wrote:
>>
>> Dear Stuart
>>
>> After looking at the makefile.am, there's no clue about hostcc and
>> buildcc. However, in makefile.in, there's build_triplets and
>> host_triplets, but i suppose it's generated from *.am via ./configure right?
>>
>> If it's not cross-compiler aware, what could i modify to differentiate
>> the hostcc and buildcc? Could you please give me some hints?
>>
>> Besides, in LTIB exisitng packages, do you know which one has these
>> hostcc and buildcc feature? I might be able to pick up some information
>> from its makefile or even specfile....
>>
>> Thanks,
>> Andy
>>
>> On Mon, Jan 23, 2012 at 10:04 PM, Stuart Hughes <[email protected]> wrote:
>>
>>> Hi Andy,
>>>
>>> You need to look in the Makefile(s) and see if they have anything to
>>> differentiate the build host from the target host. Often this may be
>>> something like HOSTCC or BUILDCC. Sometimes though there's nothing if the
>>> file is not tailored for cross compiling.
>>>
>>> Regards, Stuart
>>>
>>>
>>> On 22/01/12 18:05, Andy Yew wrote:
>>>
>>> Hi all,
>>>
>>> Has anyone successfully build/LTIB Gutenprint?
>>>
>>> Here are the log file of "./ltib -m scbuild -p gutenprint.spec" and the
>>> .spec file i've generated from template.
>>>
>>> It seems like there's slight problem running binary file within the
>>> building/making process. It's trying to run the binary and generate the
>>> xmli18n-tmp.h file in /src/xml folder.
>>>
>>> Any idea to suppress this kind of problem where make process involves
>>> running binary programs to generate data??
>>>
>>> Here's the snapshot of the last few lines showing making error:
>>>
>>> ######################################################################################################
>>> make[5]: Entering directory
>>> `/home/hongjet-vm1/ltib/rpm/BUILD/gutenprint-5.2.8/src/xml/escp2'
>>> make[5]: Nothing to be done for `all-am'.
>>> make[5]: Leaving directory
>>> `/home/hongjet-vm1/ltib/rpm/BUILD/gutenprint-5.2.8/src/xml/escp2'
>>> make[4]: Leaving directory
>>> `/home/hongjet-vm1/ltib/rpm/BUILD/gutenprint-5.2.8/src/xml/escp2'
>>> make[4]: Entering directory
>>> `/home/hongjet-vm1/ltib/rpm/BUILD/gutenprint-5.2.8/src/xml'
>>> gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -Wall
>>> -Wcast-align -Wstrict-prototypes -Wmissing-prototypes
>>> -Wmissing-declarations -Wnested-externs -Wwrite-strings
>>> -Werror-implicit-function-declaration -Winline -Wformat=2
>>> -finline-limit=131072 -Disfinite=finite -O6 -MT extract-strings.o -MD
>>> -MP -MF .deps/extract-strings.Tpo -c -o extract-strings.o extract-strings.c
>>> mv -f .deps/extract-strings.Tpo .deps/extract-strings.Po
>>> /bin/bash ../../libtool --tag=CC --mode=link gcc -Disfinite=finite
>>> -O6 -o extract-strings extract-strings.o ../../src/main/
>>> libgutenprint.la
>>> libtool: link: gcc -Disfinite=finite -O6 -o .libs/extract-strings
>>> extract-strings.o ../../src/main/.libs/libgutenprint.so -lm
>>> rm -f xmli18n-tmp.h xmli18n-tmp.h.tmp
>>> ./extract-strings `cat xml-stamp | sed -e 's;^;./;'` > xmli18n-tmp.h.tmp
>>> make[4]: Leaving directory
>>> `/home/hongjet-vm1/ltib/rpm/BUILD/gutenprint-5.2.8/src/xml'
>>> make[3]: Leaving directory
>>> `/home/hongjet-vm1/ltib/rpm/BUILD/gutenprint-5.2.8/src/xml'
>>> make[2]: Leaving directory
>>> `/home/hongjet-vm1/ltib/rpm/BUILD/gutenprint-5.2.8/src'
>>> make[1]: Leaving directory
>>> `/home/hongjet-vm1/ltib/rpm/BUILD/gutenprint-5.2.8'
>>>
>>> RPM build errors:
>>> Build time for gutenprint: 41 seconds
>>>
>>> ######################################################################################################
>>>
>>> Regards
>>> Andy
>>>
>>>
>>> _______________________________________________
>>> LTIB home page: http://ltib.org
>>>
>>> Ltib mailing
>>> [email protected]https://lists.nongnu.org/mailman/listinfo/ltib
>>>
>>>
>>>
>>
>>
>
>
_______________________________________________
LTIB home page: http://ltib.org
Ltib mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/ltib