Problem in GCCFSS cross compiler

I have followed the instructions of using gccfss as a cross compiler. But when I compile my HelloWorld.c I encountered the following error:
ld fatal: file /usr/lib/libc.so: wrong ELF machine type: EM_386
Can anyone help me?

All
I have gccfss installed along with target (sparc) machine's /usr/include and /usr/lib directory contents.
I'm trying a simple "Hello" {color:#0000ff}cross-compile{color} exercise below and getting linking {color:#ff0000}error(s){color:#000000}.
Any ideas/suggestions?
Thank you in advance, Attila.
NB: I tried setting/defining LD_LIBRARY_PATH environment variable to point to copy of target system's library directories but get "wrong ELF machine type" errors because gccfss is referencing /usr/lib directory instead.
{color}{color}{color:#ff0000}{color:#0000ff}
$ /opt/gccfss/gcc/bin/gcc -L/opt/sparc/usr/lib -L/opt/sparc/usr/lib/mdb/proc -L/opt/sparc/usr/lib/mdb/proc/sparcv9 hello.c{color}
Undefined first referenced
symbol in file
exit /opt/gccfss/gcc/bin/../lib/gcc/sparc-sun-solaris2.10/4.2.0/crt1.o
puts /tmp/ccobWhgs.o
_exit                               /opt/gccfss/gcc/bin/../lib/gcc/sparc-sun-solaris2.10/4.2.0/crt1.o
bzero /opt/sparc/usr/lib/mdb/proc/libc.so
mdb_snprintf /opt/sparc/usr/lib/mdb/proc/libc.so
mdb_printf /opt/sparc/usr/lib/mdb/proc/libc.so
atexit /opt/gccfss/gcc/bin/../lib/gcc/sparc-sun-solaris2.10/4.2.0/crt1.o
mdb_lookup_by_obj /opt/sparc/usr/lib/mdb/proc/libc.so
strcat /opt/sparc/usr/lib/mdb/proc/libc.so
strcpy /opt/sparc/usr/lib/mdb/proc/libc.so
mdb_alloc /opt/sparc/usr/lib/mdb/proc/libc.so
mdb_vread /opt/sparc/usr/lib/mdb/proc/libc.so
sig2str /opt/sparc/usr/lib/mdb/proc/libc.so
mdb_free /opt/sparc/usr/lib/mdb/proc/libc.so
mdb_warn /opt/sparc/usr/lib/mdb/proc/libc.so
strerror /opt/sparc/usr/lib/mdb/proc/libc.so
mdb_get_xdata /opt/sparc/usr/lib/mdb/proc/libc.so
_environ                            /opt/gccfss/gcc/bin/../lib/gcc/sparc-sun-solaris2.10/4.2.0/crt1.o
ld: fatal: Symbol referencing errors. No output written to a.out
collect2: ld returned 1 exit status{color}

Similar Messages

  • Problem with legacy cross compiler - Killed.

    OK, so we have some legacy cross compilers, particularly pSOS and Lynx2.4 which work successfully on Solaris 10. We installed a Server with Solaris 11 and every time we try to invoke the compiler with a make command it just responds "Killed". I've been searching but making no headway on why this occurs. What am I missing? :/
    Build scripts, etc.. all work well. For some reason the older gcc is not handling the transfer to Solaris 11 right now.
    Thanks,
    Ted

    Looks like I got it working by changing from compiling options to javac.

  • Compiler configure problems (cross compiling?)

    When attempting to compile packages, I am receiving these errors:
    checking for 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... configure: error: in `/tmp/yaourt-tmp-procyon/abs-htop/src/htop-1.0.3':
    configure: error: cannot run C compiled programs.
    If you meant to cross compile, use `--host'.
    See `config.log' for more details
    ==> ERROR: A failure occurred in build().
    Aborting...
    ==> ERROR: Makepkg was unable to build htop.
    I have not changed any cflags or other build variables. Why these errors?

    I should add, this occurred after I restored my system from a backup.

  • Problems cross-compiling imagemagick with mingw32

    I am trying to cross-compile imagemagick dlls for Windows with mingw32.
    I installed the mingw32 package and ran
    ./configure --host=i486-mingw32 --with-perl=no --enable-static=no
    The output shows something like this:
    JPEG v1           --with-jpeg=yes        no (failed tests)
    JPEG-2000         --with-jp2=yes        no (failed tests)
    LCMS v1           --with-lcms=yes        no (failed tests)
    LCMS v2           --with-lcms2=yes        no
    LQR               --with-lqr=yes        no
    Magick++          --with-magick-plus-plus=yes    yes
    OpenEXR           --with-openexr=yes        no
    PERL              --with-perl=no        no
    PNG               --with-png=yes        no (failed tests)
    RSVG              --with-rsvg=yes        yes
    TIFF              --with-tiff=yes        no (failed tests)
    In config.log the test failures are shown as follows:
    configure:27841: checking for jpeg_read_header in -ljpeg
    configure:27866: i486-mingw32-gcc -std=gnu99 -std=gnu99 -o conftest.exe   -g -O2 -Wall -I/usr/include/freetype2    -D_DLL -D_MT  -I/usr/include   -L/usr/lib conftest.c -ljpeg     -lX11   -lm   >&5
    /usr/lib/gcc/i486-mingw32/4.5.0/../../../../i486-mingw32/bin/ld: cannot find -lX11
    collect2: ld returned 1 exit status
    The compiler/linker configuration looks correct to me:
    X11 Configuration:
          X_CFLAGS        = -I/usr/include
          X_PRE_LIBS      =
          X_LIBS          = -L/usr/lib
          X_EXTRA_LIBS    =
    Options used to compile and link:
      PREFIX          = /usr/local
      EXEC-PREFIX     = /usr/local
      VERSION         = 6.6.4
      CC              = i486-mingw32-gcc -std=gnu99 -std=gnu99
      CFLAGS          = -g -O2 -Wall
      CPPFLAGS        = -I/usr/local/include/ImageMagick -D_DLL -D_MT
      PCFLAGS         = -D_DLL -D_MT
      DEFS            = -DHAVE_CONFIG_H
      LDFLAGS         = -L/usr/lib
      MAGICK_LDFLAGS  = -L/usr/local/lib -L/usr/lib
      LIBS            = -lMagickCore -lfontconfig -lX11 -pthread -lrsvg-2 -lm -lgdk_pixbuf-2.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lgdi32 -lm
      CXX             = i486-mingw32-g++
      CXXFLAGS        = -g -O2
      FEATURES        =
    Why can't it find the X11 library?

    I am trying to cross-compile imagemagick dlls for Windows with mingw32.
    I installed the mingw32 package and ran
    ./configure --host=i486-mingw32 --with-perl=no --enable-static=no
    The output shows something like this:
    JPEG v1           --with-jpeg=yes        no (failed tests)
    JPEG-2000         --with-jp2=yes        no (failed tests)
    LCMS v1           --with-lcms=yes        no (failed tests)
    LCMS v2           --with-lcms2=yes        no
    LQR               --with-lqr=yes        no
    Magick++          --with-magick-plus-plus=yes    yes
    OpenEXR           --with-openexr=yes        no
    PERL              --with-perl=no        no
    PNG               --with-png=yes        no (failed tests)
    RSVG              --with-rsvg=yes        yes
    TIFF              --with-tiff=yes        no (failed tests)
    In config.log the test failures are shown as follows:
    configure:27841: checking for jpeg_read_header in -ljpeg
    configure:27866: i486-mingw32-gcc -std=gnu99 -std=gnu99 -o conftest.exe   -g -O2 -Wall -I/usr/include/freetype2    -D_DLL -D_MT  -I/usr/include   -L/usr/lib conftest.c -ljpeg     -lX11   -lm   >&5
    /usr/lib/gcc/i486-mingw32/4.5.0/../../../../i486-mingw32/bin/ld: cannot find -lX11
    collect2: ld returned 1 exit status
    The compiler/linker configuration looks correct to me:
    X11 Configuration:
          X_CFLAGS        = -I/usr/include
          X_PRE_LIBS      =
          X_LIBS          = -L/usr/lib
          X_EXTRA_LIBS    =
    Options used to compile and link:
      PREFIX          = /usr/local
      EXEC-PREFIX     = /usr/local
      VERSION         = 6.6.4
      CC              = i486-mingw32-gcc -std=gnu99 -std=gnu99
      CFLAGS          = -g -O2 -Wall
      CPPFLAGS        = -I/usr/local/include/ImageMagick -D_DLL -D_MT
      PCFLAGS         = -D_DLL -D_MT
      DEFS            = -DHAVE_CONFIG_H
      LDFLAGS         = -L/usr/lib
      MAGICK_LDFLAGS  = -L/usr/local/lib -L/usr/lib
      LIBS            = -lMagickCore -lfontconfig -lX11 -pthread -lrsvg-2 -lm -lgdk_pixbuf-2.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lgdi32 -lm
      CXX             = i486-mingw32-g++
      CXXFLAGS        = -g -O2
      FEATURES        =
    Why can't it find the X11 library?

  • Problem cross compiling from x86_64 to i386

    Please read from the fourth message.
    OLD MESSAGE:
    Today I needed to cross compile and ld could not get libc.co.6 because it looks it with the absolute path /usr/lib/libc.so.6 ignoring -L options,
    I tried fixing using --sysroot, but ld was not compiled with its support.
    So I was wondering, it should not be better to compile with --with-sysroot ?
    Last edited by ezzetabi (2010-01-08 10:11:51)

    I am trying to compile the doom3 SDK: so it is a cross compiling from x86_64 to i386.
    After downloading the SDK and unpacking it with --tar xf, since the package uses scons  I had to modify the file SConstruct  line BASELINKFLAGS: I put BASELINKFLAGS = [ "-m32", "-L/opt/lib32/lib", "-L/opt/lib32/usr/lib", ]
    but the linking fails with
    `/usr/bin/ld: skipping incompatible /lib/libc.so.6 when searching for /lib/libc.so.6'
    On the other hand if I use
    BASELINKFLAGS = [ "-m32", "--sysroot=/opt/lib32", ]
    ld fails anyway with... :S
    /usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.2/../../../crti.o' is incompatible with i386 output
    /usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.2/crtbeginS.o' is incompatible with i386 output
    /usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.2/crtendS.o' is incompatible with i386 output
    /usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.2/../../../crtn.o' is incompatible with i386 output
    It is not really important, but I find annoying that I cannot compile it :S
    Last edited by ezzetabi (2010-01-08 09:48:59)

  • Announcing availability of  x86 hosted cross compiler for SPARC/Solaris

    We are pleased to announce the release for GCC For Sun Systems 4.2.0 cross compilers!
    This is a Solaris/x86 hosted compiler with target code generation for
    SPARC/Solaris systems. If you develop on your OpenSolaris, or Solaris
    x86 laptop or desktop, you can now start compiling your sources for
    SPARC systems. Almost all features available in the
    native SPARC GCC For Sun Systems 4.2.0 compiler are available
    for use in the cross compiler. Please refer to the mini cross compiler howto
    page for additional details on install and usage, and gotchas in cross
    development environment.
    Please continue to provide us your feedback and issues, which helps
    us make the product better.
    Thanks
    GCCFSS team

    Can GCCFSS also cross compile from in reverse - from SPARC to x86/x64?
    Thank you

  • [SOLVED] mingw32 cross compile won't link with static libraries

    Hi all,
    I'm trying to cross compile an app I have written to i486-mingw32.  I'm running Arch 64-bit (under which it compiles fine natively), and I have installed the mingw32 binaries along with mingw32-boost-static from AUR.
    All seems well, but unfortunately when I cross compile my code libtool refuses to link to the static Boost libraries:
    *** Warning: Trying to link with static lib archive /usr/i486-mingw32/lib/libboost_filesystem-mt-s.a.
    *** I have the capability to make that library automatically link in when
    *** you link to this library. But I can only do this if you have a
    *** shared version of the library, which you do not appear to have
    *** because the file extensions .a of this argument makes me believe
    *** that it is just a static archive that I should not use here.
    This then leads to undefined references as the library is not linked in.  But as I *want* the static version of the library, does anyone know how to tell libtool to accept the .a file and link it?
    Last edited by Malvineous (2011-05-02 02:44:48)

    Just to follow up on this, I discovered the problem.  It turns out libtool was doing the correct thing, and refusing to link the static library in with the shared one (otherwise later this could result in something being defined multiple times.)  The undefined references were unrelated to the error above, and the code that was causing them (in a different Boost header file) could be easily #defined out.
    When the time came to link the actual executables, libtool did include all the necessary libraries and everything worked as it should!

  • Cross compiling apps on solaris 8 for solaris 10 x86 and x64

    Hi All,
    We have a few applications built on Solaris 8. and we want to build the same apps on Solaris 10 x86 and x64 but the problem is clearcase does not support Solaris 10 yet.
    Can we cross compile the apps on Solaris 8 for Solaris 10 x86 and x64 ? and how ?
    waiting for any info on this.
    TIA,
    warm regards,
    Girish

    FYI, I noticed the reply on Sun Studio General Forum:
    If you build an app on one version of Solaris, the app will run on later Solaris versions. So in particular, you can build an x86 application on Solaris 8 and run it on Solaris 9 and 10.
    Unfortunately, an x64 application must be built on a Solaris x64 system, which first became available with Solaris 10.

  • Cross Compiling with distcc

    I have a 64-bit server and a 32-bit desktop.  I would like to run a distcc server on the 64-bit machine to cross-compile 32-bit software so my 32-bit machine can step up its guns.  I noticed that there are cross32-binutils and cross32-gcc packages in the AUR, so I assume that I can use them with distcc, but can I and how?  I want to avoid running a 32-bit chroot as much as possible (I think it's silly).

    Okay, I got it up and running ... I have two problems though, one I posted here (not trying to double-post).
    I am having the same issue.  I want to start distccd, but when I run schroot /etc/rc.d/distccd start, it says [DONE] as usual, but the daemon doesn't come up in ps -A.  if I manually chroot into /opt/arch32, I can issue the same command and it'll stay running.  I'm assuming that schroot sandboxes the environment, and when the command releases the terminal, it kills all the processes associated to it.
    How can I keep daemons running when they are started by schroot?
    My other issue is that dictccd only uses one core.  I have a hyperthreaded dual-core system on my server that constitutes as four cores, and when I'm in the 32-bit chroot, htop does in fact see four cores and appears to be using them.  The client machine is set to -j7 also, so it should be utilizing the 2+4(+1) cpus, but it isn't and I'm not sure why.

  • Cross compiling : CARCH flag

    Hi all ! I just have a question about cross compiling. No real problem in fact
    So, on the "Safe Cflags" wiki page (and on other Web pages, too), one can see lots of optimizations for various processors. But for each one, only CHOST and CFLAGS change. I don't understand what CARCH is used for, then...
    "Specifies your computer architecture; possible values include "i686" or "x86_64". This should be automatically set on installation."
    I think that if it never changes, this CARCH value only concern the computer which is compiling.
    So, if I compile something, say, for an Athlon 64 from an Intel chip, my flags would be :
    CARCH="i686"
    CHOST="x86_64-pc-linux-gnu"
    CFLAGS="-march=k8 -O2 -pipe"
    CXXFLAGS="${CFLAGS}"
    And if I compile frequently for other architectures, I would have a couple of CHOST/CFLAGS for each foreign architecture, and only one CARCH, corresponding to my computer.
    Am I right ?

    You should check out the Android NDK documentation.  The NDK comes with a cross compiler specifically for android, with the correct versions of libraries, etc.  It comes with some examples showing how to build stuff for it.
    EDIT: There is also an AUR package for it.
    Last edited by tom5760 (2011-04-04 15:56:25)

  • How to cross compile CDC CVM on Redhat6.2 for stong ARM??

    Dear all:
    Can you tell me how to cross compile CDC CVM on Redhat6.2 for stong ARM??I failed to find any
    infomation on this problem.If you know ,please tell me.
    Thanks

    Hi:
    Thank you for your advice. I'll give your advice to my boss.But is it possible to cross-compile CVM? If the answer is positive,how?
    Thank you
    Best RGDS

  • Any problems running a program compiled with SDK 1.4.2_14 with JRE 1.4.2_08

    Hi,
    Would there ever be a problem running a program compiled in Java 1.4.2_13 with JRE 1.4.2_08?
    Why or why not? No guesses please.
    Thanks

    No such hope. The alternative to testing is to review changes made to each version leading up to 14. This is spelled out in each version's Release Document. There are a lot of changes. Most will not affect your program. Each change is relatively well described, but your problem will be to decide if your program will be affected by the change.
    Or, do nothing, hope like hell that nothing breaks, and have an up-to-date copy of your resume.
    If someone came to me saying a program couldn't be tested, I'd have serious concerns for that person's future.

  • License for cross-compilation for solaris 10 sparc on Linux x86

    I'd like to do cross-compilation for solaris 10 sparc on Linux x86 using gcc (for linux). To do that, I have to copy libraries (/lib/64) and includes (/usr/include) from a sparc machine to my linux machine.
    The compilation will be run on about (up to) 50 Linux machines (by various developers). We also have 3 solaris-10-SPARC machines.
    I wonder if Solaris license allows me to copy the includes and libs to perform compilation elsewhere.
    I also checked "OTN License Agreement for Oracle Solaris", but it looks like Oracle allows for installing "the programs" on up to 3 machines, but I need it on 50.
    Thanks for any suggestions or redirections to a proper place where I can get an answer.
    Marek

    When installing Solaris 10 01/06 on a Dell 1850 I receive an error message during the install saying "no disk found". I assume that the drive/controller is not recognized. The Dell 1850 is listed under the HCL for Solaris 10 10/06. I don't believe I can use the Solaris(TM) Device Driver for the LSI MegaRAID Adapter floppy with 1/06. I don�t have any other Solaris boxes up so I can�t build a jump start server. Any suggestions?

  • Seperate include directory for i486-mingw32 cross-compiler toolchain

    I've installed the mingw32 cross-compiler. I noticed that when using this compiler, a seperate, non-standard include directory is used. So instead of copying all of the dependencies headers to compile the software, is there an easier way of including both directories?
    Thanks.

    I've installed the mingw32 cross-compiler. I noticed that when using this compiler, a seperate, non-standard include directory is used. So instead of copying all of the dependencies headers to compile the software, is there an easier way of including both directories?
    Thanks.

  • Cross compiling in Embedded /LabVIEW

    Hi,
    I am trying to create an embedded  Unix UI App .I have installed cygwin with cross compiling gcc.
    while trying to build an app i get the following errors:
    In file included from C:/Program Files/National Instruments/LabVIEW 2009/CCodeGen/include/blockdiagram/MemCheck.h:24,
                     from C:/Program Files/National Instruments/LabVIEW 2009/CCodeGen/include/blockdiagram/LVCCG.h:37,
                     from C:/Program Files/National Instruments/LabVIEW 2009/CCodeGen/include/blockdiagram/LVCGenIncludes.​h:15,
                     from /cygdrive/d/EddyCurrent/Microprocessor/Unix UI/Unix_UI/UI_Application/lvEmbeddedMain.c:20:
    C:/Program Files/National Instruments/LabVIEW 2009/CCodeGen/include/blockdiagram/LVCritSect.h:22​: Invalid token in expression
    In file included from C:/Program Files/National Instruments/LabVIEW 2009/CCodeGen/include/blockdiagram/CCGDataSupport.​h:40,
                     from C:/Program Files/National Instruments/LabVIEW 2009/CCodeGen/include/frontpanel/CCGChartGraphSupp​.h:16,
                     from C:/Program Files/National Instruments/LabVIEW 2009/CCodeGen/include/frontpanel/CCGCtlSupport.h:2​2,
                     from C:/Program Files/National Instruments/LabVIEW 2009/CCodeGen/include/blockdiagram/LVCGenIncludes.​h:17,
                     from /cygdrive/d/EddyCurrent/Microprocessor/Unix UI/Unix_UI/UI_Application/lvEmbeddedMain.c:20:
    C:/Program Files/National Instruments/LabVIEW 2009/CCodeGen/include/blockdiagram/CCGFXPSupport.h​:573: badly punctuated parameter list in `#define'
    C:/Program Files/National Instruments/LabVIEW 2009/CCodeGen/include/blockdiagram/CCGFXPSupport.h​:623: badly punctuated parameter list in `#define'
    In file included from C:/Program Files/National Instruments/LabVIEW 2009/CCodeGen/include/comms/CCGCommsSupport.h:19,
                     from C:/Program Files/National Instruments/LabVIEW 2009/CCodeGen/include/blockdiagram/LVCGenIncludes.​h:19,
                     from /cygdrive/d/EddyCurrent/Microprocessor/Unix UI/Unix_UI/UI_Application/lvEmbeddedMain.c:20:
    C:/Program Files/National Instruments/LabVIEW 2009/CCodeGen/include/comms/CCGTcpUdpSupport.h:24: Invalid token in expression
    C:/Program Files/National Instruments/LabVIEW 2009/CCodeGen/include/comms/CCGTcpUdpSupport.h:36: Invalid token in expression
    make: *** [/cygdrive/d/EddyCurrent/Microprocessor/Unix UI/Unix_UI/UI_Application/lvEmbeddedMain.o] Error 1
    How to overcome this error?All are header file errors.
    This is the first time i am trying to cross compile.
    without cross compiling i can build my app. But how to do with cross compiling....
    I have followed the steps gn in Microprocessor SDK Porting labview to new platform.
    can anyone help me pls.........
    regards,
    Indumathi.C
    LabVIEW Developer.

    Hi Anshul,
    Its not possible with "Query Browser". One thing possible which is possible is,it need not be a single row, you can divide the labels in any number of rows and any number of columns. See the below example. The yellow highlighted ones are the labels of chart, the greyish ones are the corresponding values for the labels. The sequence will be the same.
    If you dont need this way, then there are two best ways to achieve cross tab functionality.
    One thing you can do is, you can directly connect the Bex queries to the Dashboard using BICS Net weaver connection.
    But this way you can only Publish-Launch in BW. The dashboard cannot be made available in Infoview/Launch Pad.
    Other way is through Webi and BIWS connection. As Suman has mentioned.
    This way it ll be available in Infoview/Launch Pad and BW as well.
    Thanks,
    Sara

Maybe you are looking for

  • Instead of customized push notification getting only simple notification with alert message?

    Recently the provisional certificate got expired and we renewed new one installed in server the latest problem is we are just getting app name with text named alert. More than this nothing can see in push notification we are customized with name and

  • N93 TV-Out cable needed

    Please can Nokia or any formite advise where I can get another TV-out cable for my N93, accessories of Nokia state they don't have them?????? WHat if they break, thats not my problem I need one for the car and one for the tv in the house, I could rea

  • PSE 9 Changing FIle FOrmat

    Please help!  Beginning yesterday, PSE9 has been changing my filr format.  I Save As TIFF, and it stays a JPEG.  If I try to save a TIFF file as JPEG, it remains TIFF.  Now 10 files won't open and it says "unknown" even though I can see it on both th

  • Opening and saving from web site pdf file

    I found a site where you can download many pdf file. In order to automatize the process i would create a vi using activex. i generate some url  like this "http://remotesite/folder/file1.pdf" and i want the vi open the site, download the page an save

  • Converted Reports

    Hi, We have over 50 reports developed using Orace reports 6 (database oracle 8i). I managed to convert some of the reports using BI Publisher. (below an example xml file). I have copied converted pakages to my test tablespace. Is it possible to run t