Autor Tópico: Problema com compilação do usando libtool e -shared  (Lida 5946 vezes)

Offline danielgatis

  • Usuário Ubuntu
  • *
  • Mensagens: 5
    • Ver perfil
Problema com compilação do usando libtool e -shared
« Online: 06 de Janeiro de 2009, 02:29 »
Pessoal,
estou seguindo o tutorial de compilação do ginga (http://svn.softwarepublico.gov.br/trac/ginga/wiki/Building_Wiki_GingaNCL) e estou com problema na hora de linkar o telemidia-util-cpp. Aparentemente estou tentando compilar uma biblioteca mas sempre me aperece um erro perguntando pelo metodo main. Abaixo segue o erro e o config.log do autogen.sh.

 Erro:

daniel@home-desktop:~/Srcs/telemidia-util-cpp-rev16$ make
make  all-recursive
make[1]: Entering directory `/home/daniel/Srcs/telemidia-util-cpp-rev16'
Making all in include
make[2]: Entering directory `/home/daniel/Srcs/telemidia-util-cpp-rev16/include'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/daniel/Srcs/telemidia-util-cpp-rev16/include'
Making all in src
make[2]: Entering directory `/home/daniel/Srcs/telemidia-util-cpp-rev16/src'
/bin/bash ../libtool --tag=CXX   --mode=link g++  -g -O2 -Wl,-soname,libtelemidiautil.so -shared  -o libtelemidiautil.so Color.o Thread.o functions.o -lpthread -lpthread
libtool: link: g++ -g -O2 -Wl,-soname -Wl,libtelemidiautil.so -o libtelemidiautil.so Color.o Thread.o functions.o  -lpthread
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status
make[2]: *** [libtelemidiautil.so] Error 1
make[2]: Leaving directory `/home/daniel/Srcs/telemidia-util-cpp-rev16/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/daniel/Srcs/telemidia-util-cpp-rev16'
make: *** [all] Error 2

Offline danielgatis

  • Usuário Ubuntu
  • *
  • Mensagens: 5
    • Ver perfil
Re: Problema com compilação do usando libtool e -shared
« Resposta #1 Online: 06 de Janeiro de 2009, 02:31 »
continuando...

config.log

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.61.  Invocation command line was

  $ ./configure --enable-maintainer-mode

## --------- ##
## Platform. ##
## --------- ##

hostname = home-desktop
uname -m = i686
uname -r = 2.6.27-9-generic
uname -s = Linux
uname -v = #1 SMP Thu Nov 20 21:57:00 UTC 2008

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1966: checking for a BSD-compatible install
configure:2022: result: /usr/bin/install -c
configure:2033: checking whether build environment is sane
configure:2076: result: yes
configure:2104: checking for a thread-safe mkdir -p
configure:2143: result: /bin/mkdir -p
configure:2156: checking for gawk
configure:2186: result: no
configure:2156: checking for mawk
configure:2172: found /usr/bin/mawk
configure:2183: result: mawk
configure:2194: checking whether make sets $(MAKE)
configure:2215: result: yes
configure:2468: checking for g++
configure:2484: found /usr/bin/g++
configure:2495: result: g++
configure:2526: checking for C++ compiler version
configure:2533: g++ --version >&5
g++ (Ubuntu 4.3.2-1ubuntu11) 4.3.2
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2536: $? = 0
configure:2543: g++ -v >&5
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.2-1ubuntu11' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu11)
configure:2546: $? = 0
configure:2553: g++ -V >&5
g++: '-V' option must have argument
configure:2556: $? = 1
configure:2579: checking for C++ compiler default output file name
configure:2606: g++    conftest.cpp  >&5
configure:2609: $? = 0
configure:2647: result: a.out
configure:2664: checking whether the C++ compiler works
configure:2674: ./a.out
configure:2677: $? = 0
configure:2694: result: yes
configure:2701: checking whether we are cross compiling
configure:2703: result: no
configure:2706: checking for suffix of executables
configure:2713: g++ -o conftest    conftest.cpp  >&5
configure:2716: $? = 0
configure:2740: result:
configure:2746: checking for suffix of object files
configure:2772: g++ -c   conftest.cpp >&5
configure:2775: $? = 0
configure:2798: result: o
configure:2802: checking whether we are using the GNU C++ compiler
configure:2831: g++ -c   conftest.cpp >&5
configure:2837: $? = 0
configure:2854: result: yes
configure:2859: checking whether g++ accepts -g
configure:2889: g++ -c -g  conftest.cpp >&5
configure:2895: $? = 0
configure:2994: result: yes
configure:3028: checking for style of include used by make
configure:3056: result: GNU
configure:3081: checking dependency style of g++
configure:3172: result: gcc3
configure:3218: checking build system type
configure:3236: result: i686-pc-linux-gnu
configure:3258: checking host system type
configure:3273: result: i686-pc-linux-gnu
configure:3343: checking for gcc
configure:3359: found /usr/bin/gcc
configure:3370: result: gcc
configure:3608: checking for C compiler version
configure:3615: gcc --version >&5
gcc (Ubuntu 4.3.2-1ubuntu11) 4.3.2
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3618: $? = 0
configure:3625: gcc -v >&5
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.2-1ubuntu11' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu11)
configure:3628: $? = 0
configure:3635: gcc -V >&5
gcc: '-V' option must have argument
configure:3638: $? = 1
configure:3641: checking whether we are using the GNU C compiler
configure:3670: gcc -c   conftest.c >&5
configure:3676: $? = 0
configure:3693: result: yes
configure:3698: checking whether gcc accepts -g
configure:3728: gcc -c -g  conftest.c >&5
configure:3734: $? = 0
configure:3833: result: yes
configure:3850: checking for gcc option to accept ISO C89
configure:3924: gcc  -c -g -O2  conftest.c >&5
configure:3930: $? = 0
configure:3953: result: none needed
configure:3973: checking dependency style of gcc
configure:4064: result: gcc3
configure:4079: checking for a sed that does not truncate output
configure:4158: result: /bin/sed
configure:4176: checking for grep that handles long lines and -e
configure:4250: result: /bin/grep
configure:4255: checking for egrep
configure:4333: result: /bin/grep -E
configure:4338: checking for fgrep
configure:4416: result: /bin/grep -F
configure:4451: checking for ld used by gcc
configure:4518: result: /usr/bin/ld
configure:4527: checking if the linker (/usr/bin/ld) is GNU ld
configure:4542: result: yes
configure:4554: checking for BSD- or MS-compatible name lister (nm)
configure:4603: result: /usr/bin/nm -B
configure:4725: checking the name lister (/usr/bin/nm -B) interface
configure:4732: g++ -c -g -O2  conftest.cpp >&5
configure:4735: /usr/bin/nm -B "conftest.o"
configure:4738: output
00000000 B some_variable
configure:4745: result: BSD nm
configure:4748: checking whether ln -s works
configure:4752: result: yes
configure:4760: checking the maximum length of command line arguments
configure:4880: result: 1572864
configure:4897: checking whether the shell understands some XSI constructs
configure:4907: result: yes
configure:4911: checking whether the shell understands "+="
configure:4917: result: yes
configure:4952: checking for /usr/bin/ld option to reload object files
configure:4959: result: -r
configure:4986: checking how to recognize dependent libraries
configure:5176: result: pass_all
configure:5236: checking for ar
configure:5252: found /usr/bin/ar
configure:5263: result: ar
configure:5345: checking for strip
configure:5361: found /usr/bin/strip
configure:5372: result: strip
configure:5448: checking for ranlib
configure:5464: found /usr/bin/ranlib
configure:5475: result: ranlib
configure:5569: checking command to parse /usr/bin/nm -B output from gcc object
configure:5687: g++ -c -g -O2  conftest.cpp >&5
configure:5690: $? = 0
configure:5694: /usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[     ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[     ][     ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' \> conftest.nm
configure:5697: $? = 0
configure:5751: g++ -o conftest -g -O2   conftest.cpp conftstm.o >&5
configure:5754: $? = 0
configure:5792: result: ok
configure:6671: checking how to run the C preprocessor
configure:6711: gcc -E  conftest.c
configure:6717: $? = 0
configure:6748: gcc -E  conftest.c
conftest.c:10:28: error: ac_nonexistent.h: No such file or directory
configure:6754: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "telemidiautil"
| #define VERSION "0.9.29"
| /* end confdefs.h.  */
| #include <ac_nonexistent.h>
configure:6787: result: gcc -E
configure:6816: gcc -E  conftest.c
configure:6822: $? = 0
configure:6853: gcc -E  conftest.c
conftest.c:10:28: error: ac_nonexistent.h: No such file or directory
configure:6859: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "telemidiautil"
| #define VERSION "0.9.29"
| /* end confdefs.h.  */
| #include <ac_nonexistent.h>
configure:6897: checking for ANSI C header files
configure:6927: gcc -c -g -O2  conftest.c >&5
configure:6933: $? = 0
configure:7032: gcc -o conftest -g -O2   conftest.c  >&5
configure:7035: $? = 0
configure:7041: ./conftest
configure:7044: $? = 0
configure:7061: result: yes
configure:7085: checking for sys/types.h
configure:7106: gcc -c -g -O2  conftest.c >&5
configure:7112: $? = 0
configure:7128: result: yes
configure:7085: checking for sys/stat.h
configure:7106: gcc -c -g -O2  conftest.c >&5
configure:7112: $? = 0
configure:7128: result: yes
configure:7085: checking for stdlib.h
configure:7106: gcc -c -g -O2  conftest.c >&5
configure:7112: $? = 0
configure:7128: result: yes
configure:7085: checking for string.h
configure:7106: gcc -c -g -O2  conftest.c >&5
configure:7112: $? = 0
configure:7128: result: yes
configure:7085: checking for memory.h
configure:7106: gcc -c -g -O2  conftest.c >&5
configure:7112: $? = 0
configure:7128: result: yes
configure:7085: checking for strings.h
configure:7106: gcc -c -g -O2  conftest.c >&5
configure:7112: $? = 0
configure:7128: result: yes
configure:7085: checking for inttypes.h
configure:7106: gcc -c -g -O2  conftest.c >&5
configure:7112: $? = 0
configure:7128: result: yes
configure:7085: checking for stdint.h
configure:7106: gcc -c -g -O2  conftest.c >&5
configure:7112: $? = 0
configure:7128: result: yes
configure:7085: checking for unistd.h
configure:7106: gcc -c -g -O2  conftest.c >&5
configure:7112: $? = 0
configure:7128: result: yes
configure:7144: checking for dlfcn.h
configure:7165: gcc -c -g -O2  conftest.c >&5
configure:7171: $? = 0
configure:7187: result: yes
configure:7316: checking for C++ compiler version
configure:7323: g++ --version >&5
g++ (Ubuntu 4.3.2-1ubuntu11) 4.3.2
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:7326: $? = 0
configure:7333: g++ -v >&5
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.2-1ubuntu11' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu11)
configure:7336: $? = 0
configure:7343: g++ -V >&5
g++: '-V' option must have argument
configure:7346: $? = 1
configure:7349: checking whether we are using the GNU C++ compiler
configure:7401: result: yes
configure:7406: checking whether g++ accepts -g
configure:7541: result: yes
configure:7566: checking dependency style of g++
configure:7657: result: gcc3
configure:7680: checking how to run the C++ preprocessor
configure:7716: g++ -E  conftest.cpp
configure:7722: $? = 0
configure:7753: g++ -E  conftest.cpp
conftest.cpp:21:28: error: ac_nonexistent.h: No such file or directory
configure:7759: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "telemidiautil"
| #define VERSION "0.9.29"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| /* end confdefs.h.  */
| #include <ac_nonexistent.h>
configure:7792: result: g++ -E
configure:7821: g++ -E  conftest.cpp
configure:7827: $? = 0
configure:7858: g++ -E  conftest.cpp
conftest.cpp:21:28: error: ac_nonexistent.h: No such file or directory
configure:7864: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "telemidiautil"
| #define VERSION "0.9.29"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| /* end confdefs.h.  */
| #include <ac_nonexistent.h>
configure:8076: checking for objdir
configure:8091: result: .libs
configure:8383: checking if gcc supports -fno-rtti -fno-exceptions
configure:8401: gcc -c -g -O2  -fno-rtti -fno-exceptions conftest.c >&5
cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
configure:8405: $? = 0
configure:8418: result: no
configure:8438: checking for gcc option to produce PIC
configure:8695: result: -fPIC -DPIC
configure:8707: checking if gcc PIC flag -fPIC -DPIC works
configure:8725: gcc -c -g -O2  -fPIC -DPIC -DPIC conftest.c >&5
configure:8729: $? = 0
configure:8742: result: yes
configure:8766: checking if gcc static flag -static works
configure:8794: result: yes
configure:8809: checking if gcc supports -c -o file.o
configure:8830: gcc -c -g -O2  -o out/conftest2.o conftest.c >&5
configure:8834: $? = 0
configure:8856: result: yes
configure:8864: checking if gcc supports -c -o file.o
configure:8911: result: yes
configure:8944: checking whether the gcc linker (/usr/bin/ld) supports shared libraries
configure:9999: result: yes
configure:10036: checking whether -lc should be explicitly linked in
configure:10041: gcc -c -g -O2  conftest.c >&5
configure:10044: $? = 0
configure:10059: gcc -shared conftest.o  -v -Wl,-soname -Wl,conftest -o conftest 2\>\&1 \| /bin/grep  -lc  \>/dev/null 2\>\&1
configure:10062: $? = 0
configure:10074: result: no
configure:10238: checking dynamic linker characteristics
configure:10681: gcc -o conftest -g -O2   -Wl,-rpath -Wl,/foo conftest.c  >&5
configure:10687: $? = 0
configure:10929: result: GNU/Linux ld.so
configure:11031: checking how to hardcode library paths into programs
configure:11056: result: immediate
configure:11869: checking whether stripping libraries is possible
configure:11874: result: yes
configure:11909: checking if libtool supports shared libraries
configure:11911: result: yes
configure:11914: checking whether to build shared libraries
configure:11935: result: yes
configure:11938: checking whether to build static libraries
configure:11942: result: yes
configure:12092: checking for ld used by g++
configure:12159: result: /usr/bin/ld
configure:12168: checking if the linker (/usr/bin/ld) is GNU ld
configure:12183: result: yes
configure:12238: checking whether the g++ linker (/usr/bin/ld) supports shared libraries
configure:13200: result: yes
configure:13228: g++ -c -g -O2  conftest.cpp >&5
configure:13231: $? = 0
configure:13413: checking for g++ option to produce PIC
configure:13722: result: -fPIC -DPIC
configure:13731: checking if g++ PIC flag -fPIC -DPIC works
configure:13749: g++ -c -g -O2  -fPIC -DPIC -DPIC conftest.cpp >&5
configure:13753: $? = 0
configure:13766: result: yes
configure:13787: checking if g++ static flag -static works
configure:13815: result: yes
configure:13827: checking if g++ supports -c -o file.o
configure:13848: g++ -c -g -O2  -o out/conftest2.o conftest.cpp >&5
configure:13852: $? = 0
configure:13874: result: yes
configure:13879: checking if g++ supports -c -o file.o
configure:13926: result: yes
configure:13956: checking whether the g++ linker (/usr/bin/ld) supports shared libraries
configure:13985: result: yes
configure:14122: checking dynamic linker characteristics
configure:14513: g++ -o conftest -g -O2   -Wl,-rpath -Wl,/foo conftest.cpp  >&5
configure:14519: $? = 0
configure:14761: result: GNU/Linux ld.so
configure:14812: checking how to hardcode library paths into programs
configure:14837: result: immediate
configure:14907: checking pthread.h usability
configure:14924: g++ -c -g -O2  conftest.cpp >&5
configure:14930: $? = 0
configure:14944: result: yes
configure:14948: checking pthread.h presence
configure:14963: g++ -E  conftest.cpp
configure:14969: $? = 0
configure:14983: result: yes
configure:15011: checking for pthread.h
configure:15018: result: yes
configure:15033: checking for pthread_create in -lpthread
configure:15068: g++ -o conftest -g -O2   conftest.cpp -lpthread -lpthread  >&5
configure:15074: $? = 0
configure:15092: result: yes
configure:15238: creating ./config.status


Offline danielgatis

  • Usuário Ubuntu
  • *
  • Mensagens: 5
    • Ver perfil
Re: Problema com compilação do usando libtool e -shared
« Resposta #2 Online: 06 de Janeiro de 2009, 02:32 »
continuando...

## ---------------------- ##
## Running config.status. ##
## ---------------------- ##

This file was extended by config.status, which was
generated by GNU Autoconf 2.61.  Invocation command line was

  CONFIG_FILES    =
  CONFIG_HEADERS  =
  CONFIG_LINKS    =
  CONFIG_COMMANDS =
  $ ./config.status

on home-desktop

config.status:910: creating Makefile
config.status:910: creating include/Makefile
config.status:910: creating src/Makefile
config.status:910: creating config.h
config.status:1139: config.h is unchanged
config.status:1186: executing depfiles commands
config.status:1186: executing libtool commands

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=i686-pc-linux-gnu
ac_cv_c_compiler_gnu=yes
ac_cv_cxx_compiler_gnu=yes
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_header_dlfcn_h=yes
ac_cv_header_inttypes_h=yes
ac_cv_header_memory_h=yes
ac_cv_header_pthread_h=yes
ac_cv_header_stdc=yes
ac_cv_header_stdint_h=yes
ac_cv_header_stdlib_h=yes
ac_cv_header_string_h=yes
ac_cv_header_strings_h=yes
ac_cv_header_sys_stat_h=yes
ac_cv_header_sys_types_h=yes
ac_cv_header_unistd_h=yes
ac_cv_host=i686-pc-linux-gnu
ac_cv_lib_pthread_pthread_create=yes
ac_cv_objext=o
ac_cv_path_EGREP='/bin/grep -E'
ac_cv_path_FGREP='/bin/grep -F'
ac_cv_path_GREP=/bin/grep
ac_cv_path_SED=/bin/sed
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=mawk
ac_cv_prog_CPP='gcc -E'
ac_cv_prog_CXXCPP='g++ -E'
ac_cv_prog_ac_ct_AR=ar
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_ac_ct_CXX=g++
ac_cv_prog_ac_ct_RANLIB=ranlib
ac_cv_prog_ac_ct_STRIP=strip
ac_cv_prog_cc_c89=
ac_cv_prog_cc_g=yes
ac_cv_prog_cxx_g=yes
ac_cv_prog_make_make_set=yes
am_cv_CC_dependencies_compiler_type=gcc3
am_cv_CXX_dependencies_compiler_type=gcc3
lt_cv_deplibs_check_method=pass_all
lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
lt_cv_ld_reload_flag=-r
lt_cv_nm_interface='BSD nm'
lt_cv_objdir=.libs
lt_cv_path_LD=/usr/bin/ld
lt_cv_path_LDCXX=/usr/bin/ld
lt_cv_path_NM='/usr/bin/nm -B'
lt_cv_prog_compiler_c_o=yes
lt_cv_prog_compiler_c_o_CXX=yes
lt_cv_prog_compiler_pic_works=yes
lt_cv_prog_compiler_pic_works_CXX=yes
lt_cv_prog_compiler_rtti_exceptions=no
lt_cv_prog_compiler_static_works=yes
lt_cv_prog_compiler_static_works_CXX=yes
lt_cv_prog_gnu_ld=yes
lt_cv_prog_gnu_ldcxx=yes
lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[     ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[     ][     ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\'''
lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \([^ ]*\) $/  {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/  {"\2", (void *) \&\2},/p'\'''
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \([^ ]*\) $/  {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \(lib[^ ]*\)$/  {"\2", (void *) \&\2},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/  {"lib\2", (void *) \&\2},/p'\'''
lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\'''
lt_cv_sys_max_cmd_len=1572864

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL} /home/daniel/Srcs/telemidia-util-cpp-rev16/missing --run aclocal-1.10'
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='${SHELL} /home/daniel/Srcs/telemidia-util-cpp-rev16/missing --run tar'
AR='ar'
AUTOCONF='${SHELL} /home/daniel/Srcs/telemidia-util-cpp-rev16/missing --run autoconf'
AUTOHEADER='${SHELL} /home/daniel/Srcs/telemidia-util-cpp-rev16/missing --run autoheader'
AUTOMAKE='${SHELL} /home/daniel/Srcs/telemidia-util-cpp-rev16/missing --run automake-1.10'
AWK='mawk'
CC='gcc'
CCDEPMODE='depmode=gcc3'
CFLAGS='-g -O2'
CPP='gcc -E'
CPPFLAGS=''
CXX='g++'
CXXCPP='g++ -E'
CXXDEPMODE='depmode=gcc3'
CXXFLAGS='-g -O2'
CYGPATH_W='echo'
DEFS='-DHAVE_CONFIG_H'
DEPDIR='.deps'
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP='/bin/grep -E'
EXEEXT=''
FGREP='/bin/grep -F'
GREP='/bin/grep'
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LD='/usr/bin/ld'
LDFLAGS=''
LIBOBJS=''
LIBS='-lpthread '
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
LIPO=''
LN_S='ln -s'
LTLIBOBJS=''
MAKEINFO='${SHELL} /home/daniel/Srcs/telemidia-util-cpp-rev16/missing --run makeinfo'
NM='/usr/bin/nm -B'
NMEDIT=''
OBJEXT='o'
OTOOL64=''
OTOOL=''
PACKAGE='telemidiautil'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RANLIB='ranlib'
SED='/bin/sed'
SET_MAKE=''
SHELL='/bin/bash'
STRIP='strip'
VERSION='0.9.29'
ac_ct_CC='gcc'
ac_ct_CXX='g++'
ac_ct_DUMPBIN=''
am__fastdepCC_FALSE='#'
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE='#'
am__fastdepCXX_TRUE=''
am__include='include'
am__isrc=''
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build='i686-pc-linux-gnu'
build_alias=''
build_cpu='i686'
build_os='linux-gnu'
build_vendor='pc'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='${prefix}'
host='i686-pc-linux-gnu'
host_alias=''
host_cpu='i686'
host_os='linux-gnu'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='$(SHELL) /home/daniel/Srcs/telemidia-util-cpp-rev16/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
lt_ECHO='echo'
mandir='${datarootdir}/man'
mkdir_p='/bin/mkdir -p'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr/local'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE "telemidiautil"
#define VERSION "0.9.29"
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define HAVE_DLFCN_H 1
#define LT_OBJDIR ".libs/"
#define HAVE_LIBPTHREAD 1

configure: exit 0


Agradeço desde já e descupem o tamanho do post.

Offline fpissarra

  • Usuário Ubuntu
  • *
  • Mensagens: 246
    • Ver perfil
    • Lost in the e-Jungle
Re: Problema com compilação do usando libtool e -shared
« Resposta #3 Online: 06 de Janeiro de 2009, 09:07 »
libtool: link: g++ -g -O2 -Wl,-soname -Wl,libtelemidiautil.so -o libtelemidiautil.so Color.o Thread.o functions.o  -lpthread
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status

Onde são compilados os arquivos objeto? Aqui só diz que main() não pode ser encontrado.

Offline danielgatis

  • Usuário Ubuntu
  • *
  • Mensagens: 5
    • Ver perfil
Re: Problema com compilação do usando libtool e -shared
« Resposta #4 Online: 06 de Janeiro de 2009, 10:25 »
Os objetos já foram compilados quando dei o make anteriormente. Eles se encontram na pasta corrente.

O engraçado é que uma linha acima está imprimido no console

/libtool --tag=CXX   --mode=link g++  -g -O2 -Wl,-soname,libtelemidiautil.so -shared -o libtelemidiautil.so Color.o Thread.o functions.o -lpthread -lpthread

e logo na linha de baixo o shared desaparece:

libtool: link: g++ -g -O2 -Wl,-soname -Wl,libtelemidiautil.so -o libtelemidiautil.so Color.o Thread.o functions.o  -lpthread

alguma dica?




Offline fpissarra

  • Usuário Ubuntu
  • *
  • Mensagens: 246
    • Ver perfil
    • Lost in the e-Jungle
Re: Problema com compilação do usando libtool e -shared
« Resposta #5 Online: 08 de Janeiro de 2009, 12:55 »
Os objetos já foram compilados quando dei o make anteriormente. Eles se encontram na pasta corrente.

O engraçado é que uma linha acima está imprimido no console

/libtool --tag=CXX   --mode=link g++  -g -O2 -Wl,-soname,libtelemidiautil.so -shared -o libtelemidiautil.so Color.o Thread.o functions.o -lpthread -lpthread

e logo na linha de baixo o shared desaparece:

libtool: link: g++ -g -O2 -Wl,-soname -Wl,libtelemidiautil.so -o libtelemidiautil.so Color.o Thread.o functions.o  -lpthread

alguma dica?

Infelizmente sou meio "cru" com o uso do libtool, mas me parece que a linha de comando está errada.

O que segue --mode=link é a linha de comando do g++:

Código: [Selecionar]
libtool --tag=CXX   --mode=link [color=red]g++  -g -O2 -Wl,-soname,libtelemidiautil.so [color=red]-shared [/color] -o libtelemidiautil.so Color.o Thread.o functions.o -lpthread -lpthread[/color]
-Wl acho que não existe, nunca vi usar virgulas para separar nomes de libs. O uso de -shared está certo, já que você quer gerar um shared object (so). Dessa linha de comando eu não compreendi o "-Wl,-soname,libtelemidiautil.so", o resto parece correto.

Dá uma olhada na documentação do libtool (em http://www.gnu.org/software/libtool/) e do GCC (em http://gcc.gnu.org/).

[]s
Fred

Offline danielgatis

  • Usuário Ubuntu
  • *
  • Mensagens: 5
    • Ver perfil
Re: Problema com compilação do usando libtool e -shared
« Resposta #6 Online: 10 de Janeiro de 2009, 11:55 »
Obrigado! vou ler a documentação.

Offline ginga_user

  • Usuário Ubuntu
  • *
  • Mensagens: 1
    • Ver perfil
Re: Problema com compilação do usando libtool e -shared
« Resposta #7 Online: 02 de Maio de 2010, 02:01 »
O problema é a versão da libtool, que requer que passe a opcao -Xcompiler antes de -shared para passar isso ao compilador (fonte: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=526547 )

No caso do ginga, basta substituir todas ocorrencias de -shared nos arquivos Makefile.am por -Xcompiler -shared. A seguinte linha faz isso de forma recursiva na árvore:
 
Código: [Selecionar]
find . -name Makefile.am -exec sed -i 's/-shared/-Xcompiler -shared/g' {} \;