Loading ...
Sorry, an error occurred while loading the content.

compilation problem

Expand Messages
  • gerard
    hello all, i ve a problem when trying to compile on opensolaris, and i m not sure if it is solaris-related. This test failed: cat conftest.c int main () {
    Message 1 of 5 , Jan 1, 2010
    • 0 Attachment
      hello all,
      i've a problem when trying to compile on opensolaris, and i'm not sure
      if it is solaris-related.
      This test failed:
      cat conftest.c
      int main () { asm("pabsw %xmm0, %xmm0"); return 0; }

      with gcc:
      gcc conftest.c -O3 -march=opteron -mssse3 -m64 -Xlinker -i
      -fno-omit-frame-pointer -fPIC -DPIC -Wall -I. -DHAVE_MALLOC_H
      -L/usr/lib/amd64 -R/usr/lib/amd64 -Wl,-zignore -Wl,-zcombreloc
      -Wl,-Bdirect -lm -L/lib -R/lib -o conftest
      /var/tmp//cc1kaqGw.s: Assembler messages:
      /var/tmp//cc1kaqGw.s:10: Error: no such instruction: `pabsw %xmm0,%xmm0'


      It is gcc 4.3.3
      gcc -v
      Using built-in specs.
      Target: i386-pc-solaris2.11
      Configured with: ../gcc-4.3.3/configure --prefix=/usr/gnu
      --libdir=/usr/gnu/lib --libexecdir=/usr/gnu/lib
      --mandir=/usr/gnu/share/man --infodir=/usr/share/info
      --with-build-time-tools=/usr/sfw --with-as=/usr/sfw/bin/gas
      --with-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld
      --enable-languages=c,c++,fortran,objc --enable-shared --disable-static
      --enable-decimal-float --with-gmp_include=/usr/include/gmp
      --with-mpfr=/usr/gnu -disable-nls
      Thread model: posix
      gcc version 4.3.3 (GCC)

      But it seems that SSE are supported on (open)solaris, so what am i
      missing? What are the requirements to have SSE with (open)solaris?
      I built gcc with SFE, and according the options, i think that i can have
      assembler in C routines.
      The test with Sun Studio seems ok:
      cc conftest.c -O3 -xarch=sse2 -m64
      file a.out
      a.out: ELF 64-bit LSB executable AMD64 Version 1 [SSSE3 SSE
      FXSR FPU], dynamically linked, not stripped

      but this software needs gcc (it's part of ffmpeg)

      thanks in advance for help and happy new year,

      gerard
    • Bob Friesenhahn
      ... When I built GCC 4.3.3 and 4.3.4, I used a more modern GNU assembler from binutils: % gcc-4.3.3 -v Using built-in specs. Target: i386-pc-solaris2.10
      Message 2 of 5 , Jan 1, 2010
      • 0 Attachment
        > Thread model: posix
        > gcc version 4.3.3 (GCC)
        >
        > But it seems that SSE are supported on (open)solaris, so what am i
        > missing? What are the requirements to have SSE with (open)solaris?
        > I built gcc with SFE, and according the options, i think that i can have
        > assembler in C routines.

        When I built GCC 4.3.3 and 4.3.4, I used a more modern GNU assembler
        from binutils:

        % gcc-4.3.3 -v
        Using built-in specs.
        Target: i386-pc-solaris2.10
        Configured with: /home/bfriesen/src/gnu/gcc-4.3.3/configure
        LDFLAGS='-L/usr/local/lib -R/usr/local/lib' --program-suffix=-4.3.3
        --enable-shared --enable-threads
        --enable-version-specific-runtime-libs --with-gnu-as
        --with-as=/usr/local/lib/binutils-2.19/bin/as --without-gnu-ld
        --with-ld=/usr/ccs/bin/ld --with-cpu=opteron
        --enable-languages=c,c++,fortran
        Thread model: posix
        gcc version 4.3.3 (GCC)

        And I used a newer binutils (2.20) for 4.4.2:

        % gcc -v
        Using built-in specs.
        Target: i386-pc-solaris2.10
        Configured with: /home/bfriesen/src/gnu/gcc-4.4.2/configure
        LDFLAGS='-L/usr/local/lib -R/usr/local/lib' --program-suffix=-4.4.2
        --enable-shared --enable-threads
        --enable-version-specific-runtime-libs --with-gnu-as
        --with-as=/usr/local/lib/binutils-2.20/bin/as --without-gnu-ld
        --with-ld=/usr/ccs/bin/ld --with-gmp=/usr/local --with-mpfr=/usr/local
        --with-cpu=opteron --enable-languages=c,c++,fortran
        Thread model: posix
        gcc version 4.4.2 (GCC)

        I am pretty happy with GCC 4.4.2.

        Bob
        --
        Bob Friesenhahn
        bfriesen@..., http://www.simplesystems.org/users/bfriesen/
        GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
      • John Martin
        ... Which build of OpenSolaris? gas in build 130 knows about the pabsw instruction. [Non-text portions of this message have been removed]
        Message 3 of 5 , Jan 1, 2010
        • 0 Attachment
          On 01/ 1/10 04:50 PM, gerard wrote:
          >
          > hello all,
          > i've a problem when trying to compile on opensolaris, and i'm not sure
          > if it is solaris-related.
          > This test failed:
          > cat conftest.c
          > int main () { asm("pabsw %xmm0, %xmm0"); return 0; }
          >
          > with gcc:
          > gcc conftest.c -O3 -march=opteron -mssse3 -m64 -Xlinker -i
          > -fno-omit-frame-pointer -fPIC -DPIC -Wall -I. -DHAVE_MALLOC_H
          > -L/usr/lib/amd64 -R/usr/lib/amd64 -Wl,-zignore -Wl,-zcombreloc
          > -Wl,-Bdirect -lm -L/lib -R/lib -o conftest
          > /var/tmp//cc1kaqGw.s: Assembler messages:
          > /var/tmp//cc1kaqGw.s:10: Error: no such instruction: `pabsw %xmm0,%xmm0'
          >
          > ..... --with-as=/usr/sfw/bin/gas
          >

          Which build of OpenSolaris? gas in build 130 knows about the pabsw
          instruction.



          [Non-text portions of this message have been removed]
        • gerard
          ... os2009.06 b111b, release not dev, i don t have choice. So there is a huge difference between /usr/sfw/bin/gas from SUNWbinutils 2.15 and as from Sun
          Message 4 of 5 , Jan 2, 2010
          • 0 Attachment
            On 01/ 1/10 11:40 PM, John Martin wrote:
            > On 01/ 1/10 04:50 PM, gerard wrote:
            >>
            >> hello all,
            >> i've a problem when trying to compile on opensolaris, and i'm not sure
            >> if it is solaris-related.
            >> This test failed:
            >> cat conftest.c
            >> int main () { asm("pabsw %xmm0, %xmm0"); return 0; }
            >>
            >> with gcc:
            >> gcc conftest.c -O3 -march=opteron -mssse3 -m64 -Xlinker -i
            >> -fno-omit-frame-pointer -fPIC -DPIC -Wall -I. -DHAVE_MALLOC_H
            >> -L/usr/lib/amd64 -R/usr/lib/amd64 -Wl,-zignore -Wl,-zcombreloc
            >> -Wl,-Bdirect -lm -L/lib -R/lib -o conftest
            >> /var/tmp//cc1kaqGw.s: Assembler messages:
            >> /var/tmp//cc1kaqGw.s:10: Error: no such instruction: `pabsw %xmm0,%xmm0'
            >>
            >> ..... --with-as=/usr/sfw/bin/gas
            >>
            >
            > Which build of OpenSolaris? gas in build 130 knows about the pabsw
            > instruction.
            >

            os2009.06 b111b, release not dev, i don't have choice.
            So there is a huge difference between /usr/sfw/bin/gas from SUNWbinutils
            2.15 and as from Sun Studio?

            gerard
          • gerard
            ... ok, os2009.06 comes with SUNWbinutils 2.15, i suppose that i have to recompile a recent binutils? in b130, it comes with 2.19 gerard
            Message 5 of 5 , Jan 2, 2010
            • 0 Attachment
              On 01/ 1/10 11:21 PM, Bob Friesenhahn wrote:
              >> Thread model: posix
              >> gcc version 4.3.3 (GCC)
              >>
              >> But it seems that SSE are supported on (open)solaris, so what am i
              >> missing? What are the requirements to have SSE with (open)solaris?
              >> I built gcc with SFE, and according the options, i think that i can have
              >> assembler in C routines.
              >
              > When I built GCC 4.3.3 and 4.3.4, I used a more modern GNU assembler
              > from binutils:
              >

              ok, os2009.06 comes with SUNWbinutils 2.15, i suppose that i have to
              recompile a recent binutils? in b130, it comes with 2.19

              gerard
            Your message has been successfully submitted and would be delivered to recipients shortly.