CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2002
    Location
    Berkeley, CA
    Posts
    17

    32bit compilation on a 64bit linux box.

    why won't my bloody 32bit compilation work on a 64bit linux box?

    Code:
    $ cat hello32.c
    #include <stdio.h>
    
    int
    main()
    {
      printf("Hello\n");
      return 0;
    }
    
    $ gcc -m32 hello32.c -lc
    /usr/bin/ld: crt1.o: No such file: No such file or directory
    collect2: ld returned 1 exit status
    
    $ gcc -m32 hello32.c
    /usr/bin/ld: crt1.o: No such file: No such file or directory
    collect2: ld returned 1 exit status
    
    $ uname -a
    Linux xxx 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:29:47 EST 2005 x86_64 x86_64 x86_64 GNU/Linux
    
    
    $ gcc -v
    Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.3/specs
    Configured with: ../configure --prefix=/usr 
    --mandir=/usr/share/man 
    --infodir=/usr/share/info 
    --enable-shared 
    --enable-threads=posix 
    --disable-checking 
    --with-system-zlib 
    --enable-__cxa_atexit 
    --disable-libunwind-exceptions 
    --enable-languages=c,c++,objc,java,f77 
    --enable-java-awt=gtk 
    --host=x86_64-redhat-linux
    Thread model: posix
    gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)

  2. #2
    Join Date
    Mar 2004
    Location
    (Upper-) Austria
    Posts
    2,899

    Re: 32bit compilation on a 64bit linux box.

    [ Moved Thread ]
    I am not offering technical guidiance via email or IM
    Come on share your photo with us! CG members photo album!
    Use the Code Tags!

  3. #3
    Join Date
    Feb 2005
    Location
    Pasadena, MD, USA
    Posts
    105

    Re: 32bit compilation on a 64bit linux box.

    Hi Goanuj,

    It appears ld cannot find the c runtime on your box.

    Did you verify crt1.o is on that machine? If not, does 64bit Linux require a library compile? Are the paths set up properly for ld?

    Jeff

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured