LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-10-2010, 11:39 AM   #1
maztech
LQ Newbie
 
Registered: Jun 2010
Location: Huntsville, AL
Distribution: various (Fedora, Freescale, Ubuntu, ...)
Posts: 6

Rep: Reputation: 0
Libtool has syntax errors when running after GLib-2 cross compile for PPC using LTIB?


Hi guys-

So I've run into a strange problem in a somewhat complicated situation:

First, I'm trying to cross compile mono 2.6.4 so that it will run on Freescale Embedded Linux for a PowerPC CPU. My host machine is running Fedora 13 on an x86. Freescale provides a copy of the Linux Target Image Builder (LTIB) that has been pre-configured for the particular board I'm using, and LTIB seems to be able to help with the cross compilation of other stuff--you can add in your own packages to be built and included in your newly-built Linux image.

Mono depends on pkg-config and glib-2, so I have selected them in the LTIB package selection config. I've also added a new package for mono that builds mono-2.6.4 from the source tar (after the other deps have also been built).

I'm having a problem getting the glib-2.24.0 package libraries created. Basically they appear to build and link ok, but then libtool runs and errors out claiming it has a syntax error! (numerous wths followed...)

Here is LTIB's temporary build script for only the glib2 package:
Code:
#!/bin/sh

  RPM_SOURCE_DIR="/home/Mike/ltib-mpc8572ds-20100115/rpm/SOURCES"
  RPM_BUILD_DIR="/home/Mike/ltib-mpc8572ds-20100115/rpm/BUILD"
  RPM_OPT_FLAGS="-O2 -fsigned-char"
  RPM_ARCH="i386"
  RPM_OS="linux"
  export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS
  RPM_DOC_DIR="/opt/freescale/ltib/usr/doc"
  export RPM_DOC_DIR
  RPM_PACKAGE_NAME="glib2"
  RPM_PACKAGE_VERSION="2.24.0"
  RPM_PACKAGE_RELEASE="1"
  export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE
  RPM_BUILD_ROOT="/home/Mike/ltib-mpc8572ds-20100115/tmp/glib2"
  export RPM_BUILD_ROOT
  
  set -x
  umask 022
  cd /home/Mike/ltib-mpc8572ds-20100115/rpm/BUILD
cd glib-2.24.0
# prevent configure from trying to compile and
# run test binaries for the target.
glib_cv_stack_grows=no \
glib_cv_uscore=no \
ac_cv_func_posix_getpwuid_r=yes \
ac_cv_func_posix_getgrgid_r=yes \
./configure --prefix=/usr --host=$CFGHOST --build=i686-pc-linux-gnu
make

exit 0
Here is the output when building the glib2 package (configure + make):
Code:
[Mike@dev-vm-mbuilder3 ltib-mpc8572ds-20100115]$ ./ltib -m scbuild -p glib2

Processing: glib2
===================
Build path taken because: directory build, build key set, no prebuilt rpm, 

rpmbuild --dbpath /home/Mike/ltib-mpc8572ds-20100115/rootfs//var/lib/rpm --target ppc --define '_unpackaged_files_terminate_build 0' --define '_target_cpu ppc' --define '__strip strip' --define '_topdir /home/Mike/ltib-mpc8572ds-20100115/rpm' --define '_prefix /usr' --define '_tmppath /home/Mike/ltib-mpc8572ds-20100115/tmp' --define '_rpmdir /home/Mike/ltib-mpc8572ds-20100115/rpm/RPMS'  --define '_mandir /usr/share/man' --define '_sysconfdir /etc' --define '_localstatedir /var' -bc --short-circuit  /home/Mike/ltib-mpc8572ds-20100115/dist/lfs-5.1/glib2/glib2.spec
Building target platforms: ppc
Building for target ppc
Executing(%build): /bin/sh -e /home/Mike/ltib-mpc8572ds-20100115/tmp/rpm-tmp.14713
+ umask 022
+ cd /home/Mike/ltib-mpc8572ds-20100115/rpm/BUILD
+ cd glib-2.24.0
+ glib_cv_stack_grows=no
+ glib_cv_uscore=no
+ ac_cv_func_posix_getpwuid_r=yes
+ ac_cv_func_posix_getgrgid_r=yes
+ ./configure --prefix=/usr --host=powerpc-linux --build=i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for powerpc-linux-strip... no
checking for strip... strip
configure: WARNING: using cross tools not prefixed with host triplet
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... i686-pc-linux-gnu
checking host system type... powerpc-unknown-linux-gnu
checking for the BeOS... no
checking for Win32... no
checking for Mac OS X Carbon support... checking for style of include used by make... GNU
checking for powerpc-linux-gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
no
checking whether to enable garbage collector friendliness... no
checking whether to disable memory pools... no
checking for powerpc-linux-gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking for powerpc-linux-c++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for powerpc-linux-gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for pkg-config... /opt/freescale/ltib/usr/bin/pkg-config
checking for gawk... (cached) gawk
checking for perl5... no
checking for perl... perl
checking for indent... indent
checking for perl... /usr/bin/perl
checking for a Python interpreter with version >= 2.4... python
checking for python... /usr/bin/python
checking for python version... 2.6
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.6/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.6/site-packages
checking for iconv_open... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether we are using the GNU C Library 2.1 or newer... yes
checking Whether to cache iconv descriptors... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for inflate in -lz... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for LC_MESSAGES... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking for ngettext in libc... yes
checking for dgettext in libc... yes
checking for bind_textdomain_codeset... yes
checking for msgfmt... /usr/bin/msgfmt
checking for dcgettext... yes
checking if msgfmt accepts -c... yes
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for catalogs to be installed...  af am ar as ast az be be@latin bg bn bn_IN bs ca ca@valencia cs cy da de dz el en_CA en_GB en@shaw eo es et eu fa fi fr ga gl gu he hi hr hu hy id is it ja ka kn ko ku lt lv mai mg mk ml mn mr ms nb nds ne nl nn oc or pa pl ps pt pt_BR ro ru rw si sk sl sq sr sr@latin sr@ije sv ta te th tl tr tt uk vi wa xh yi zh_CN zh_HK zh_TW
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... ld
checking if the linker (ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... no
checking for powerpc-linux-dumpbin... no
checking for powerpc-linux-link... no
checking for dumpbin... no
checking for link... link -dump -symbols
checking the name lister (link -dump -symbols) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1966080
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for ld option to reload object files... -r
checking for powerpc-linux-objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for powerpc-linux-ar... ar
checking for powerpc-linux-strip... strip
checking for powerpc-linux-ranlib... no
checking for ranlib... ranlib
checking command to parse link -dump -symbols output from gcc object... failed
checking for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking how to run the C++ preprocessor... g++ -E
checking for objdir... .libs
{ ... some configure output removed to save space  ... }
configure: creating ./config.status
config.status: creating glib-2.0.pc
config.status: creating glib-2.0-uninstalled.pc
config.status: creating gmodule-2.0.pc
config.status: creating gmodule-export-2.0.pc
config.status: creating gmodule-no-export-2.0.pc
config.status: creating gmodule-2.0-uninstalled.pc
config.status: creating gmodule-no-export-2.0-uninstalled.pc
config.status: creating gthread-2.0.pc
config.status: creating gthread-2.0-uninstalled.pc
config.status: creating gobject-2.0.pc
config.status: creating gobject-2.0-uninstalled.pc
config.status: creating gio-2.0.pc
config.status: creating gio-unix-2.0.pc
config.status: creating gio-2.0-uninstalled.pc
config.status: creating gio-unix-2.0-uninstalled.pc
config.status: creating glib-zip
config.status: creating glib-gettextize
config.status: creating Makefile
config.status: creating build/Makefile
config.status: creating build/win32/Makefile
config.status: creating build/win32/dirent/Makefile
config.status: creating build/win32/vs9/Makefile
config.status: creating glib/Makefile
config.status: creating glib/libcharset/Makefile
config.status: creating glib/gnulib/Makefile
config.status: creating glib/pcre/Makefile
config.status: creating glib/update-pcre/Makefile
config.status: creating glib/tests/Makefile
config.status: creating gmodule/Makefile
config.status: creating gmodule/gmoduleconf.h
config.status: creating gobject/Makefile
config.status: creating gobject/glib-mkenums
config.status: creating gobject/tests/Makefile
config.status: creating gthread/Makefile
config.status: creating gthread/tests/Makefile
config.status: creating gio/Makefile
config.status: creating gio/xdgmime/Makefile
config.status: creating gio/inotify/Makefile
config.status: creating gio/libasyncns/Makefile
config.status: creating gio/fen/Makefile
config.status: creating gio/fam/Makefile
config.status: creating gio/win32/Makefile
config.status: creating gio/tests/Makefile
config.status: creating po/Makefile.in
config.status: creating docs/Makefile
config.status: creating docs/reference/Makefile
config.status: creating docs/reference/glib/Makefile
config.status: creating docs/reference/glib/version.xml
config.status: creating docs/reference/gobject/Makefile
config.status: creating docs/reference/gobject/version.xml
config.status: creating docs/reference/gio/Makefile
config.status: creating docs/reference/gio/version.xml
config.status: creating tests/Makefile
config.status: creating tests/gobject/Makefile
config.status: creating tests/refcount/Makefile
config.status: creating m4macros/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing default-1 commands
config.status: executing libtool commands
config.status: executing glibconfig.h commands
config.status: glibconfig.h is unchanged
config.status: executing chmod-scripts commands
+ make
cd . && /bin/sh ./config.status glibconfig.h
config.status: executing glibconfig.h commands
config.status: glibconfig.h is unchanged
echo timestamp > stamp-gc-h
make  all-recursive
make[1]: Entering directory `/home/Mike/ltib-mpc8572ds-20100115/rpm/BUILD/glib-2.24.0'
Making all in .
make[2]: Entering directory `/home/Mike/ltib-mpc8572ds-20100115/rpm/BUILD/glib-2.24.0'
make[2]: Leaving directory `/home/Mike/ltib-mpc8572ds-20100115/rpm/BUILD/glib-2.24.0'
Making all in m4macros
make[2]: Entering directory `/home/Mike/ltib-mpc8572ds-20100115/rpm/BUILD/glib-2.24.0/m4macros'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/Mike/ltib-mpc8572ds-20100115/rpm/BUILD/glib-2.24.0/m4macros'
Making all in glib
make[2]: Entering directory `/home/Mike/ltib-mpc8572ds-20100115/rpm/BUILD/glib-2.24.0/glib'
make  all-recursive
make[3]: Entering directory `/home/Mike/ltib-mpc8572ds-20100115/rpm/BUILD/glib-2.24.0/glib'
Making all in libcharset
make[4]: Entering directory `/home/Mike/ltib-mpc8572ds-20100115/rpm/BUILD/glib-2.24.0/glib/libcharset'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/Mike/ltib-mpc8572ds-20100115/rpm/BUILD/glib-2.24.0/glib/libcharset'
Making all in gnulib
make[4]: Entering directory `/home/Mike/ltib-mpc8572ds-20100115/rpm/BUILD/glib-2.24.0/glib/gnulib'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/Mike/ltib-mpc8572ds-20100115/rpm/BUILD/glib-2.24.0/glib/gnulib'
Making all in pcre
make[4]: Entering directory `/home/Mike/ltib-mpc8572ds-20100115/rpm/BUILD/glib-2.24.0/glib/pcre'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/Mike/ltib-mpc8572ds-20100115/rpm/BUILD/glib-2.24.0/glib/pcre'
Making all in update-pcre
make[4]: Entering directory `/home/Mike/ltib-mpc8572ds-20100115/rpm/BUILD/glib-2.24.0/glib/update-pcre'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/Mike/ltib-mpc8572ds-20100115/rpm/BUILD/glib-2.24.0/glib/update-pcre'
Making all in .
make[4]: Entering directory `/home/Mike/ltib-mpc8572ds-20100115/rpm/BUILD/glib-2.24.0/glib'
/bin/sh ../libtool  --tag=CC   --mode=link gcc  -g -O2 -Wall  -version-info 2400:0:2400 -export-dynamic  -export-symbols-regex "^g.*"  -o libglib-2.0.la -rpath /usr/lib garray.lo gasyncqueue.lo gatomic-gcc.lo gbacktrace.lo gbase64.lo gbitlock.lo gbookmarkfile.lo gbuffer.lo gcache.lo gchecksum.lo gcompletion.lo gconvert.lo gdataset.lo gdate.lo gdir.lo gerror.lo gfileutils.lo ghash.lo ghook.lo ghostutils.lo giochannel.lo gkeyfile.lo glist.lo gmain.lo gmappedfile.lo gmarkup.lo gmem.lo gmessages.lo gnode.lo goption.lo gpattern.lo gpoll.lo gprimes.lo gqsort.lo gqueue.lo grel.lo grand.lo gregex.lo gscanner.lo gsequence.lo gshell.lo gslice.lo gslist.lo gstdio.lo gstrfuncs.lo gstring.lo gtestutils.lo gthread.lo gthreadpool.lo gtimer.lo gtree.lo guniprop.lo gutf8.lo gunibreak.lo gunicollate.lo gunidecomp.lo gurifuncs.lo gutils.lo gvariant.lo gvariant-core.lo gvariant-parser.lo gvariant-serialiser.lo gvarianttypeinfo.lo gvarianttype.lo gprintf.lo libcharset/libcharset.la gnulib/libgnulib.la giounix.lo gspawn.lo    pcre/libpcre.la 
libtool: link: link -dump -symbols  .libs/garray.o .libs/gasyncqueue.o .libs/gatomic-gcc.o .libs/gbacktrace.o .libs/gbase64.o .libs/gbitlock.o .libs/gbookmarkfile.o .libs/gbuffer.o .libs/gcache.o .libs/gchecksum.o .libs/gcompletion.o .libs/gconvert.o .libs/gdataset.o .libs/gdate.o .libs/gdir.o .libs/gerror.o .libs/gfileutils.o .libs/ghash.o .libs/ghook.o .libs/ghostutils.o .libs/giochannel.o .libs/gkeyfile.o .libs/glist.o .libs/gmain.o .libs/gmappedfile.o .libs/gmarkup.o .libs/gmem.o .libs/gmessages.o .libs/gnode.o .libs/goption.o .libs/gpattern.o .libs/gpoll.o .libs/gprimes.o .libs/gqsort.o .libs/gqueue.o .libs/grel.o .libs/grand.o .libs/gregex.o .libs/gscanner.o .libs/gsequence.o .libs/gshell.o .libs/gslice.o .libs/gslist.o .libs/gstdio.o .libs/gstrfuncs.o .libs/gstring.o .libs/gtestutils.o .libs/gthread.o .libs/gthreadpool.o .libs/gtimer.o .libs/gtree.o .libs/guniprop.o .libs/gutf8.o .libs/gunibreak.o .libs/gunicollate.o .libs/gunidecomp.o .libs/gurifuncs.o .libs/gutils.o .libs/gvariant.o .libs/gvariant-core.o .libs/gvariant-parser.o .libs/gvariant-serialiser.o .libs/gvarianttypeinfo.o .libs/gvarianttype.o .libs/gprintf.o .libs/giounix.o .libs/gspawn.o   libcharset/.libs/libcharset.a gnulib/.libs/libgnulib.a pcre/.libs/libpcre.a |  | /bin/sed 's/.* //' | sort | uniq > .libs/libglib-2.0.exp
../libtool: eval: line 964: syntax error near unexpected token `|'
../libtool: eval: line 964: `link -dump -symbols  .libs/garray.o .libs/gasyncqueue.o .libs/gatomic-gcc.o .libs/gbacktrace.o .libs/gbase64.o .libs/gbitlock.o .libs/gbookmarkfile.o .libs/gbuffer.o .libs/gcache.o .libs/gchecksum.o .libs/gcompletion.o .libs/gconvert.o .libs/gdataset.o .libs/gdate.o .libs/gdir.o .libs/gerror.o .libs/gfileutils.o .libs/ghash.o .libs/ghook.o .libs/ghostutils.o .libs/giochannel.o .libs/gkeyfile.o .libs/glist.o .libs/gmain.o .libs/gmappedfile.o .libs/gmarkup.o .libs/gmem.o .libs/gmessages.o .libs/gnode.o .libs/goption.o .libs/gpattern.o .libs/gpoll.o .libs/gprimes.o .libs/gqsort.o .libs/gqueue.o .libs/grel.o .libs/grand.o .libs/gregex.o .libs/gscanner.o .libs/gsequence.o .libs/gshell.o .libs/gslice.o .libs/gslist.o .libs/gstdio.o .libs/gstrfuncs.o .libs/gstring.o .libs/gtestutils.o .libs/gthread.o .libs/gthreadpool.o .libs/gtimer.o .libs/gtree.o .libs/guniprop.o .libs/gutf8.o .libs/gunibreak.o .libs/gunicollate.o .libs/gunidecomp.o .libs/gurifuncs.o .libs/gutils.o .libs/gvariant.o .libs/gvariant-core.o .libs/gvariant-parser.o .libs/gvariant-serialiser.o .libs/gvarianttypeinfo.o .libs/gvarianttype.o .libs/gprintf.o .libs/giounix.o .libs/gspawn.o   libcharset/.libs/libcharset.a gnulib/.libs/libgnulib.a pcre/.libs/libpcre.a |  | /bin/sed 's/.* //' | sort | uniq > .libs/libglib-2.0.exp'
../libtool: line 964: warning: syntax errors in . or eval will cause future versions of the shell to abort as Posix requires
make[4]: *** [libglib-2.0.la] Error 1
make[4]: Leaving directory `/home/Mike/ltib-mpc8572ds-20100115/rpm/BUILD/glib-2.24.0/glib'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/Mike/ltib-mpc8572ds-20100115/rpm/BUILD/glib-2.24.0/glib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/Mike/ltib-mpc8572ds-20100115/rpm/BUILD/glib-2.24.0/glib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/Mike/ltib-mpc8572ds-20100115/rpm/BUILD/glib-2.24.0'
make: *** [all] Error 2
error: Bad exit status from /home/Mike/ltib-mpc8572ds-20100115/tmp/rpm-tmp.14713 (%build)


RPM build errors:
    Bad exit status from /home/Mike/ltib-mpc8572ds-20100115/tmp/rpm-tmp.14713 (%build)
Build time for glib2: 92 seconds

Failed building glib2


f_scbuild() returned an error, exiting
traceback:
 main:560

Exiting on error or interrupt
Specifically:
../libtool: eval: line 964: syntax error near unexpected token `|'
and
../libtool: line 964: warning: syntax errors in . or eval will cause future versions of the shell to abort as Posix requires

Line 964 of ltib-mpc8572ds-20100115/rpm/BUILD/glib-2.24.0/libtool is the one below that reads eval "$my_cmd"
Code:
...

# func_show_eval cmd [fail_exp]
# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
# is given, then evaluate it.
func_show_eval ()
{
    my_cmd="$1"
    my_fail_exp="${2-:}"

    ${opt_silent-false} || {
      func_quote_for_expand "$my_cmd"
      eval "func_echo $func_quote_for_expand_result"
    }

    if ${opt_dry_run-false}; then :; else
      eval "$my_cmd"
      my_status=$?
      if test "$my_status" -eq 0; then :; else
	eval "(exit $my_status); $my_fail_exp"
      fi
    fi
}

...
Any advice on why I'm running into this problem and how I might resolve it would be most appreciated. If there is other relevant info I can pass along, just ask.

-Mike
 
Old 06-13-2010, 09:27 PM   #2
Mr-Bisquit
Member
 
Registered: Feb 2009
Distribution: FreeBSD, OpenBSD, NetBSD, Debian, Fedora
Posts: 770
Blog Entries: 52

Rep: Reputation: 68
Why is the build for i686 when the target is ppc?
 
Old 06-29-2010, 01:43 PM   #3
maztech
LQ Newbie
 
Registered: Jun 2010
Location: Huntsville, AL
Distribution: various (Fedora, Freescale, Ubuntu, ...)
Posts: 6

Original Poster
Rep: Reputation: 0
The parameter names are somewhat inconsistent in how they refer to the system doing the building (which I'd call the Host) and the system for which the binaries are being constructed (which I'd call the Target). In that particular line, build= refers to the Target architecture, which (I agree) is confusing. I had to verify this myself because I was not sure.

In this cross-compile case, the Host (builder machine) is i686-linux and the Target is ppc-linux.
 
Old 06-29-2010, 01:45 PM   #4
maztech
LQ Newbie
 
Registered: Jun 2010
Location: Huntsville, AL
Distribution: various (Fedora, Freescale, Ubuntu, ...)
Posts: 6

Original Poster
Rep: Reputation: 0
After much heartburn I believe we have worked around this problem. It looks like this was being caused by NM not being defined, which was being concatenated with a number of other commands within Libtool. When NM evaluated to nothing, this resulted in the syntax error mentioned above.

Apparently this NM problem was introduced back in glib-2.19.something and people have been working around it since then. Defining a shell variable NM to lower-case nm before the call to configure (eg: "NM=nm") seems to work around the problem effectively.

I consider this to no longer be a problem. Thanks to all that might have spent time thinking about it for me.
 
Old 07-01-2010, 03:48 PM   #5
cinda
LQ Newbie
 
Registered: Jul 2010
Posts: 2

Rep: Reputation: 0
I have this same problem while installing another package. Where exactly should I give NM = nm ?

Thanks!
 
Old 07-01-2010, 04:00 PM   #6
maztech
LQ Newbie
 
Registered: Jun 2010
Location: Huntsville, AL
Distribution: various (Fedora, Freescale, Ubuntu, ...)
Posts: 6

Original Poster
Rep: Reputation: 0
Hi cinda-
Below is part of my LTIB glib2.spec file, which runs configure and then make for the glib-2.24.1 in my environment. Hope this helps.

Code:
...

glib_cv_stack_grows=no \
glib_cv_uscore=no \
ac_cv_func_posix_getpwuid_r=yes \
ac_cv_func_posix_getgrgid_r=yes \
NM=nm \
./configure --prefix=%{_prefix} --host=$CFGHOST --build=%{_build}

make

...
 
Old 07-01-2010, 08:56 PM   #7
cinda
LQ Newbie
 
Registered: Jul 2010
Posts: 2

Rep: Reputation: 0
Thank for the reply Mike.

But I am not able to figure out my problem. I am working on buildroot- cross compile tool for gumstix. And I guess configure is called from makefile.in. I tried adding the statement there. Thanks anyway!
 
Old 07-15-2010, 12:39 PM   #8
venjun2000
LQ Newbie
 
Registered: Jul 2010
Posts: 1

Rep: Reputation: 0
Hi maztech,

I am facing similar problem while building clutter package.

See my error :

CC clutter-units.lo
CC clutter-util.lo
CC clutter-id-pool.lo
CCLD libclutter-eglnative-1.0.la
../libtool: eval: line 944: syntax error near unexpected token `|'
../libtool: eval: line 944: `link -dump -symbols .libs/clutter-actor.o .libs/clutter-alpha.o .libs/clutter-animatable.o .libs/clutter-animation.o .libs/clutter-animator.o .libs/clutter-backend.o .libs/clutter-behaviour.o .libs/clutter-behaviour-depth.o .libs/clutter-behaviour-ellipse.o .libs/clutter-behaviour-opacity.o .libs/clutter-behaviour-path.o .libs/clutter-behaviour-rotate.o .libs/clutter-behaviour-scale.o .libs/clutter-bezier.o .libs/clutter-binding-pool.o .libs/clutter-bin-layout.o .libs/clutter-box.o .libs/clutter-box-layout.o .libs/clutter-cairo-texture.o .libs/clutter-child-meta.o .libs/clutter-clone.o .libs/clutter-color.o .libs/clutter-container.o .libs/clutter-device-manager.o .libs/clutter-enum-types.o .libs/clutter-event.o .libs/clutter-feature.o .libs/clutter-fixed.o .libs/clutter-fixed-layout.o .libs/clutter-flow-layout.o .libs/clutter-frame-source.o .libs/clutter-group.o .libs/clutter-input-device.o .libs/clutter-interval.o .libs/clutter-layout-manager.o .libs/clutter-layout-meta.o .libs/clutter-list-model.o .libs/clutter-main.o .libs/clutter-marshal.o .libs/clutter-master-clock.o .libs/clutter-media.o .libs/clutter-model.o .libs/clutter-path.o .libs/clutter-rectangle.o .libs/clutter-score.o .libs/clutter-script.o .libs/clutter-script-parser.o .libs/clutter-scriptable.o .libs/clutter-shader.o .libs/clutter-shader-types.o .libs/clutter-stage.o .libs/clutter-stage-manager.o .libs/clutter-stage-window.o .libs/clutter-texture.o .libs/clutter-text.o .libs/clutter-timeline.o .libs/clutter-timeout-pool.o .libs/clutter-units.o .libs/clutter-util.o .libs/clutter-id-pool.o .libs/clutter-profile.o .libs/clutter-timeout-interval.o ../clutter/cogl/cogl/.libs/libclutter-cogl.a ../clutter/cogl/pango/.libs/libcoglpango.a ../clutter/eglnative/.libs/libclutter-eglnative.a ../clutter/json/.libs/libclutter-json.a | | /usr/bin/sed 's/.* //' | sort | uniq > .libs/libclutter-eglnative-1.0.exp'
make[4]: *** [libclutter-eglnative-1.0.la] Error 1
make[4]: Leaving directory `/home/jtag/clutter/ltib-imx31ads-rel5/rpm/BUILD/clutter-1.2.4/clutter'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/jtag/clutter/ltib-imx31ads-rel5/rpm/BUILD/clutter-1.2.4/clutter'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/jtag/clutter/ltib-imx31ads-rel5/rpm/BUILD/clutter-1.2.4/clutter'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jtag/clutter/ltib-imx31ads-rel5/rpm/BUILD/clutter-1.2.4'
make: *** [all] Error 2
error: Bad exit status from /home/jtag/clutter/ltib-imx31ads-rel5/tmp/rpm-tmp.70927 (%build)


==

I tried your fix "NM=mn" in my clutter.spec just before calling configure.

But it didnt worked.. do u have any idea why it didnt worked?

Please reply
 
  


Reply

Tags
crosscompile, glib, libtool, ltib, powerpc



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to: Cross compile GLib lumdongtien Linux - Software 3 10-18-2009 08:36 PM
Cross-compile cdrdao in ppc ,cdrdao's size is too large hougaga Linux - Software 3 02-27-2008 09:15 AM
Glib cross compile error m.harshavardhan Linux - General 1 12-04-2007 03:31 AM
glib Error: while building Cross-Compiler for PPC Dhana_pal Linux From Scratch 2 12-28-2006 12:57 AM
Errors during the test suite for Glibc-20050926 32 Bit � Cross compile x86_64 Basel Linux From Scratch 3 10-29-2005 06:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration