5 Replies Latest reply: Apr 18, 2013 5:20 AM by SFV RSS

    Problem while compiling exiv2 with SolarisStudio

    1003797
      Source Code I want to compile: http://www.exiv2.org/exiv2-0.23.tar.gz

      This command runs fine, compiles fine, no problems.
      cmake -DCMAKE_CXX_FLAGS=-library=stlport4 -DCMAKE_CXX_COMPILER=/opt/oracle/solarisstudio12.3/bin/CC -DCMAKE_C_COMPILER=/opt/oracle/solarisstudio12.3/bin/cc <exiv2-dir> ; make

      But this command fails:
      ./configure CXX=/opt/oracle/solarisstudio12.3/bin/CC CC=/opt/oracle/solarisstudio12.3/bin/cc CXXFLAGS=-library=stlport4 ; make
      [Wani@Linux trunk]$ make
      if test "x1" = "x1"; then cd xmpsdk/src && make xmpsdk; fi;
      make[1]: Entering directory `/home/Wani/GSoC/exiv2-trunk/trunk/xmpsdk/src'
      libtool: compile: /opt/oracle/solarisstudio12.3/bin/CC -library=stlport4 -xldscope=hidden -I. -DEXV_LOCALEDIR=\"/usr/local/share/locale\" -I../include -funsigned-char -DNDEBUG=1 -DEXV_HAVE_STDINT_H=1 -c XML_Node.cpp -KPIC -DPIC -o .libs/XML_Node.o
      CC: Warning: Option -funsigned-char passed to ld, if ld is invoked, ignored otherwise
      libtool: compile: /opt/oracle/solarisstudio12.3/bin/CC -library=stlport4 -xldscope=hidden -I. -DEXV_LOCALEDIR=\"/usr/local/share/locale\" -I../include -funsigned-char -DNDEBUG=1 -DEXV_HAVE_STDINT_H=1 -c XML_Node.cpp -o XML_Node.o >/dev/null 2>&1
      CC: Warning: Option -funsigned-char passed to ld, if ld is invoked, ignored otherwise
      /opt/oracle/solarisstudio12.3/prod/lib/amd64/crt1x.o: In function `_start':
      fsr.s:(.text+0x3b): undefined reference to `main'
      make[1]: *** [XML_Node.o] Error 2
      make[1]: Leaving directory `/home/Wani/GSoC/exiv2-trunk/trunk/xmpsdk/src'
      make: *** [xmpsdk] Error 2
      [Wani@Linux trunk]$

      Edited by: 1000794 on Apr 17, 2013 10:27 PM
        • 1. Re: Problem while compiling exiv2 with SolarisStudio
          NikMolchanov
          This looks like a bug in the "configure" script - it should not generate a makefile, that passes "-funsigned-char" to Oracle Solaris Studio compilers,
          because they do not accept this option. Probably you can edit generated makefile and remove this option?
          • 2. Re: Problem while compiling exiv2 with SolarisStudio
            1003797
            That doesn't resolve the issue here. Look again, even if I remove -funsigned-char form the Makefile, I get the following error:

            [Wani@Linux trunk]$ make
            if test "x1" = "x1"; then cd xmpsdk/src && make xmpsdk; fi;
            make[1]: Entering directory `/home/Wani/GSoC/exiv2-trunk/trunk/xmpsdk/src'
            libtool: compile: /opt/oracle/solarisstudio12.3/bin/CC -library=stlport4 -xldscope=hidden -I. -DEXV_LOCALEDIR=\"/usr/local/share/locale\" -I../include -DNDEBUG=1 -DEXV_HAVE_STDINT_H=1 -c XML_Node.cpp -KPIC -DPIC -o .libs/XML_Node.o
            libtool: compile: /opt/oracle/solarisstudio12.3/bin/CC -library=stlport4 -xldscope=hidden -I. -DEXV_LOCALEDIR=\"/usr/local/share/locale\" -I../include -DNDEBUG=1 -DEXV_HAVE_STDINT_H=1 -c XML_Node.cpp -o XML_Node.o >/dev/null 2>&1
            /opt/oracle/solarisstudio12.3/prod/lib/amd64/crt1x.o: In function `_start':
            fsr.s:(.text+0x3b): undefined reference to `main'
            make[1]: *** [XML_Node.o] Error 2
            make[1]: Leaving directory `/home/Wani/GSoC/exiv2-trunk/trunk/xmpsdk/src'
            make: *** [xmpsdk] Error 2
            [Wani@Linux trunk]$
            • 3. Re: Problem while compiling exiv2 with SolarisStudio
              SFV
              Libtool is a beast that can be difficult to deal with.

              This:
              /opt/oracle/solarisstudio12.3/prod/lib/amd64/crt1x.o: In function `_start':
              fsr.s:(.text+0x3b): undefined reference to `main'
              is the output of linker. Most likely instead of just compiling as it promised (-c) libtool
              did full compilation (without -c ) running linker as a final stage of compilation.
              Given that it was compiling some lib it should have been just compiling into .o

              regards,
              __Fedor.
              • 4. Re: Problem while compiling exiv2 with SolarisStudio
                1003797
                How can I repair it? cmake . ; make works fine but ./configure ; make doesn't, why?
                • 5. Re: Problem while compiling exiv2 with SolarisStudio
                  SFV
                  I really hate saying that, but you will have to navigate through the maze of makes and wrappers like this libtool down to the compiler invocation.
                  cmake . ; make works fine but ./configure ; make doesn't, why?
                  Perhaps cmake-generated makefile does not use libtool?

                  regards,
                  __Fedor.