找回密码
 用户注册

QQ登录

只需一步,快速开始

查看: 11456|回复: 7

linux下编译ACE6.2失败

[复制链接]
发表于 2013-10-26 11:55:04 | 显示全部楼层 |阅读模式
好像是链接的时候出错,我是按照ACE-INSTALL.html来编译的,下是编译的输出
make[1]: Entering directory `/root/ACE_wrappers/ace'

GNUmakefile: /root/ACE_wrappers/ace/GNUmakefile.ACE MAKEFLAGS=w

g++ -pthread -Wl,-O3 -shared -Wl,-h -Wl,libACE.so.6.2.2 -o libACE.so.6.2.2 .shobj/Local_Name_Space.o .shobj/Name_Proxy.o .shobj/Name_Request_Reply.o .shobj/Name_Space.o .shobj/Naming_Context.o .shobj/Registry_Name_Space.o .shobj/Remote_Name_Space.o .shobj/NT_Service.o .shobj/Codecs.o .shobj/Local_Tokens.o .shobj/Remote_Tokens.o .shobj/Token_Collection.o .shobj/Token_Invariants.o .shobj/Token_Manager.o .shobj/Token_Request_Reply.o .shobj/DLL.o .shobj/Dynamic_Service_Base.o .shobj/Dynamic_Service_Dependency.o .shobj/Parse_Node.o .shobj/Service_Config.o .shobj/Service_Gestalt.o .shobj/Service_Manager.o .shobj/Service_Object.o .shobj/Service_Repository.o .shobj/Service_Types.o .shobj/Shared_Object.o .shobj/Svc_Conf_Lexer.o .shobj/Svc_Conf_y.o .shobj/Encoding_Converter.o .shobj/Encoding_Converter_Factory.o .shobj/UTF8_Encoding_Converter.o .shobj/UTF16_Encoding_Converter.o .shobj/UTF32_Encoding_Converter.o .shobj/XML_Svc_Conf.o .shobj/UUID.o .shobj/Filecache.o .shobj/ACE.o .shobj/ACE_crc_ccitt.o .shobj/ACE_crc32.o .shobj/ace_wchar.o .shobj/Activation_Queue.o .shobj/Active_Map_Manager.o .shobj/Addr.o .shobj/Argv_Type_Converter.o .shobj/Assert.o .shobj/Asynch_IO.o .shobj/Asynch_IO_Impl.o .shobj/Asynch_Pseudo_Task.o .shobj/ATM_Acceptor.o .shobj/ATM_Addr.o .shobj/ATM_Connector.o .shobj/ATM_Params.o .shobj/ATM_QoS.o .shobj/ATM_Stream.o .shobj/Atomic_Op.o .shobj/Atomic_Op_Sparc.o .shobj/Barrier.o .shobj/Base_Thread_Adapter.o .shobj/Based_Pointer_Repository.o .shobj/Basic_Stats.o .shobj/Basic_Types.o .shobj/Capabilities.o .shobj/CDR_Base.o .shobj/CDR_Stream.o .shobj/CDR_Size.o .shobj/Cleanup.o .shobj/Codeset_IBM1047.o .shobj/Codeset_Registry.o .shobj/Codeset_Registry_db.o .shobj/Condition_Attributes.o .shobj/Condition_Recursive_Thread_Mutex.o .shobj/Condition_Thread_Mutex.o .shobj/Configuration.o .shobj/Configuration_Import_Export.o .shobj/Connection_Recycling_Strategy.o .shobj/Containers.o .shobj/Copy_Disabled.o .shobj/Date_Time.o .shobj/DEV.o .shobj/DEV_Addr.o .shobj/DEV_Connector.o .shobj/DEV_IO.o .shobj/DLL_Manager.o .shobj/Dev_Poll_Reactor.o .shobj/Dirent.o .shobj/Dirent_Selector.o .shobj/Dump.o .shobj/Dynamic.o .shobj/Dynamic_Message_Strategy.o .shobj/Event_Base.o .shobj/Event_Handler.o .shobj/Event_Handler_Handle_Timeout_Upcall.o .shobj/FIFO.o .shobj/FIFO_Recv.o .shobj/FIFO_Recv_Msg.o .shobj/FIFO_Send.o .shobj/FIFO_Send_Msg.o .shobj/FILE.o .shobj/FILE_Addr.o .shobj/FILE_Connector.o .shobj/FILE_IO.o .shobj/File_Lock.o .shobj/Flag_Manip.o .shobj/Framework_Component.o .shobj/Functor.o .shobj/Functor_String.o .shobj/Get_Opt.o .shobj/Handle_Ops.o .shobj/Handle_Set.o .shobj/Hashable.o .shobj/High_Res_Timer.o .shobj/ICMP_Socket.o .shobj/INET_Addr.o .shobj/Init_ACE.o .shobj/IO_SAP.o .shobj/IO_Cntl_Msg.o .shobj/IOStream.o .shobj/IPC_SAP.o .shobj/Lib_Find.o .shobj/Local_Memory_Pool.o .shobj/Lock.o .shobj/Log_Category.o .shobj/Log_Msg.o .shobj/Log_Msg_Backend.o .shobj/Log_Msg_Callback.o .shobj/Log_Msg_IPC.o .shobj/Log_Msg_NT_Event_Log.o .shobj/Log_Msg_UNIX_Syslog.o .shobj/Log_Record.o .shobj/Logging_Strategy.o .shobj/LSOCK.o .shobj/LSOCK_Acceptor.o .shobj/LSOCK_CODgram.o .shobj/LSOCK_Connector.o .shobj/LSOCK_Dgram.o .shobj/LSOCK_Stream.o .shobj/Malloc.o .shobj/Malloc_Allocator.o .shobj/MEM_Acceptor.o .shobj/MEM_Addr.o .shobj/MEM_Connector.o .shobj/MEM_IO.o .shobj/Mem_Map.o .shobj/MEM_SAP.o .shobj/MEM_Stream.o .shobj/Message_Block.o .shobj/Message_Queue.o .shobj/Message_Queue_NT.o .shobj/Message_Queue_Vx.o .shobj/Method_Request.o .shobj/MMAP_Memory_Pool.o .shobj/Msg_WFMO_Reactor.o .shobj/Monitor_Admin.o .shobj/Monitor_Admin_Manager.o .shobj/Monitor_Base.o .shobj/Monitor_Point_Registry.o .shobj/Monitor_Size.o .shobj/Monitor_Control_Types.o .shobj/Monitor_Control_Action.o .shobj/Monotonic_Time_Policy.o .shobj/Multihomed_INET_Addr.o .shobj/Mutex.o .shobj/Netlink_Addr.o .shobj/Notification_Strategy.o .shobj/Notification_Queue.o .shobj/Obchunk.o .shobj/Object_Manager.o .shobj/Object_Manager_Base.o .shobj/OS_Errno.o .shobj/OS_Log_Msg_Attributes.o .shobj/OS_main.o .shobj/OS_NS_arpa_inet.o .shobj/OS_NS_ctype.o .shobj/OS_NS_dirent.o .shobj/OS_NS_dlfcn.o .shobj/OS_NS_errno.o .shobj/OS_NS_fcntl.o .shobj/OS_NS_math.o .shobj/OS_NS_netdb.o .shobj/OS_NS_poll.o .shobj/OS_NS_pwd.o .shobj/OS_NS_regex.o .shobj/OS_NS_signal.o .shobj/OS_NS_stdio.o .shobj/OS_NS_stdlib.o .shobj/OS_NS_string.o .shobj/OS_NS_strings.o .shobj/OS_NS_stropts.o .shobj/OS_NS_sys_mman.o .shobj/OS_NS_sys_msg.o .shobj/OS_NS_sys_resource.o .shobj/OS_NS_sys_select.o .shobj/OS_NS_sys_sendfile.o .shobj/OS_NS_sys_shm.o .shobj/OS_NS_sys_socket.o .shobj/OS_NS_sys_stat.o .shobj/OS_NS_sys_time.o .shobj/OS_NS_sys_uio.o .shobj/OS_NS_sys_utsname.o .shobj/OS_NS_sys_wait.o .shobj/OS_NS_Thread.o .shobj/OS_NS_time.o .shobj/OS_NS_unistd.o .shobj/OS_NS_wchar.o .shobj/OS_NS_wctype.o .shobj/OS_QoS.o .shobj/OS_Thread_Adapter.o .shobj/OS_TLI.o .shobj/Pagefile_Memory_Pool.o .shobj/PI_Malloc.o .shobj/Ping_Socket.o .shobj/Pipe.o .shobj/POSIX_Asynch_IO.o .shobj/POSIX_CB_Proactor.o .shobj/POSIX_Proactor.o .shobj/Priority_Reactor.o .shobj/Proactor.o .shobj/Proactor_Impl.o .shobj/Process.o .shobj/Process_Manager.o .shobj/Process_Mutex.o .shobj/Process_Semaphore.o .shobj/Profile_Timer.o .shobj/Reactor.o .shobj/Reactor_Impl.o .shobj/Reactor_Notification_Strategy.o .shobj/Reactor_Timer_Interface.o .shobj/Read_Buffer.o .shobj/Recursive_Thread_Mutex.o .shobj/Recyclable.o .shobj/Registry.o .shobj/Rtems_init.o .shobj/RW_Mutex.o .shobj/RW_Process_Mutex.o .shobj/RW_Thread_Mutex.o .shobj/Sample_History.o .shobj/Sbrk_Memory_Pool.o .shobj/Sched_Params.o .shobj/Select_Reactor_Base.o .shobj/Semaphore.o .shobj/Shared_Memory.o .shobj/Shared_Memory_MM.o .shobj/Shared_Memory_Pool.o .shobj/Shared_Memory_SV.o .shobj/Sig_Adapter.o .shobj/Sig_Handler.o .shobj/Signal.o .shobj/SOCK.o .shobj/SOCK_Acceptor.o .shobj/SOCK_CODgram.o .shobj/Sock_Connect.o .shobj/SOCK_Connector.o .shobj/SOCK_Dgram.o .shobj/SOCK_Dgram_Bcast.o .shobj/SOCK_Dgram_Mcast.o .shobj/SOCK_IO.o .shobj/SOCK_Netlink.o .shobj/SOCK_SEQPACK_Acceptor.o .shobj/SOCK_SEQPACK_Association.o .shobj/SOCK_SEQPACK_Connector.o .shobj/SOCK_Stream.o .shobj/SPIPE.o .shobj/SPIPE_Acceptor.o .shobj/SPIPE_Addr.o .shobj/SPIPE_Connector.o .shobj/SPIPE_Stream.o .shobj/SString.o .shobj/Stack_Trace.o .shobj/Stats.o .shobj/String_Base_Const.o .shobj/SUN_Proactor.o .shobj/SV_Message.o .shobj/SV_Message_Queue.o .shobj/SV_Semaphore_Complex.o .shobj/SV_Semaphore_Simple.o .shobj/SV_Shared_Memory.o .shobj/Synch_Options.o .shobj/System_Time.o .shobj/Task.o .shobj/Thread.o .shobj/Thread_Adapter.o .shobj/Thread_Control.o .shobj/Thread_Exit.o .shobj/Thread_Hook.o .shobj/Thread_Manager.o .shobj/Thread_Mutex.o .shobj/Thread_Semaphore.o .shobj/Throughput_Stats.o .shobj/Time_Policy.o .shobj/Time_Value.o .shobj/Timeprobe.o .shobj/TLI.o .shobj/TLI_Acceptor.o .shobj/TLI_Connector.o .shobj/TLI_Stream.o .shobj/Token.o .shobj/TP_Reactor.o .shobj/Trace.o .shobj/TSS_Adapter.o .shobj/TTY_IO.o .shobj/UNIX_Addr.o .shobj/UPIPE_Acceptor.o .shobj/UPIPE_Connector.o .shobj/UPIPE_Stream.o .shobj/WFMO_Reactor.o .shobj/WIN32_Asynch_IO.o .shobj/WIN32_Proactor.o .shobj/XTI_ATM_Mcast.o -Wl,-E -L../lib -L.  -L../lib   -ldl -lrt
.shobj/MEM_Acceptor.o:(.rodata+0x0): multiple definition of `typeinfo name for ACE_Singleton<ACE_Based_Pointer_Repository, ACE_RW_Thread_Mutex>'
.shobj/Based_Pointer_Repository.o:(.rodata+0x0): first defined here
.shobj/MEM_Acceptor.o:(.data.rel.ro+0x0): multiple definition of `typeinfo for ACE_Singleton<ACE_Based_Pointer_Repository, ACE_RW_Thread_Mutex>'
.shobj/Based_Pointer_Repository.o:(.data.rel.ro+0x0): first defined here
.shobj/MEM_Connector.o:(.rodata+0x0): multiple definition of `typeinfo name for ACE_Singleton<ACE_Based_Pointer_Repository, ACE_RW_Thread_Mutex>'
.shobj/Based_Pointer_Repository.o:(.rodata+0x0): first defined here
.shobj/MEM_Connector.o:(.data.rel.ro+0x0): multiple definition of `typeinfo for ACE_Singleton<ACE_Based_Pointer_Repository, ACE_RW_Thread_Mutex>'
.shobj/Based_Pointer_Repository.o:(.data.rel.ro+0x0): first defined here
.shobj/MEM_IO.o:(.rodata+0x0): multiple definition of `typeinfo name for ACE_Singleton<ACE_Based_Pointer_Repository, ACE_RW_Thread_Mutex>'
.shobj/Based_Pointer_Repository.o:(.rodata+0x0): first defined here
.shobj/MEM_IO.o:(.data.rel.ro+0x0): multiple definition of `typeinfo for ACE_Singleton<ACE_Based_Pointer_Repository, ACE_RW_Thread_Mutex>'
.shobj/Based_Pointer_Repository.o:(.data.rel.ro+0x0): first defined here
.shobj/MEM_SAP.o:(.rodata+0x0): multiple definition of `typeinfo name for ACE_Singleton<ACE_Based_Pointer_Repository, ACE_RW_Thread_Mutex>'
.shobj/Based_Pointer_Repository.o:(.rodata+0x0): first defined here
.shobj/MEM_SAP.o:(.data.rel.ro+0x0): multiple definition of `typeinfo for ACE_Singleton<ACE_Based_Pointer_Repository, ACE_RW_Thread_Mutex>'
.shobj/Based_Pointer_Repository.o:(.data.rel.ro+0x0): first defined here
.shobj/MEM_Stream.o:(.rodata+0x0): multiple definition of `typeinfo name for ACE_Singleton<ACE_Based_Pointer_Repository, ACE_RW_Thread_Mutex>'
.shobj/Based_Pointer_Repository.o:(.rodata+0x0): first defined here
.shobj/MEM_Stream.o:(.data.rel.ro+0x0): multiple definition of `typeinfo for ACE_Singleton<ACE_Based_Pointer_Repository, ACE_RW_Thread_Mutex>'
.shobj/Based_Pointer_Repository.o:(.data.rel.ro+0x0): first defined here
.shobj/MMAP_Memory_Pool.o:(.rodata+0x34): multiple definition of `typeinfo name for ACE_Singleton<ACE_Based_Pointer_Repository, ACE_RW_Thread_Mutex>'
.shobj/Based_Pointer_Repository.o:(.rodata+0x0): first defined here
.shobj/MMAP_Memory_Pool.o:(.data.rel.ro+0x18): multiple definition of `typeinfo for ACE_Singleton<ACE_Based_Pointer_Repository, ACE_RW_Thread_Mutex>'
.shobj/Based_Pointer_Repository.o:(.data.rel.ro+0x0): first defined here
.shobj/Pagefile_Memory_Pool.o:(.rodata+0x0): multiple definition of `typeinfo name for ACE_Singleton<ACE_Based_Pointer_Repository, ACE_RW_Thread_Mutex>'
.shobj/Based_Pointer_Repository.o:(.rodata+0x0): first defined here
.shobj/Pagefile_Memory_Pool.o:(.data.rel.ro+0x0): multiple definition of `typeinfo for ACE_Singleton<ACE_Based_Pointer_Repository, ACE_RW_Thread_Mutex>'
.shobj/Based_Pointer_Repository.o:(.data.rel.ro+0x0): first defined here
.shobj/PI_Malloc.o:(.rodata+0x0): multiple definition of `typeinfo name for ACE_Singleton<ACE_Based_Pointer_Repository, ACE_RW_Thread_Mutex>'
.shobj/Based_Pointer_Repository.o:(.rodata+0x0): first defined here
.shobj/PI_Malloc.o:(.data.rel.ro+0x0): multiple definition of `typeinfo for ACE_Singleton<ACE_Based_Pointer_Repository, ACE_RW_Thread_Mutex>'
.shobj/Based_Pointer_Repository.o:(.data.rel.ro+0x0): first defined here
collect2: ld returned 1 exit status
make[1]: *** [libACE.so.6.2.2] Error 1
make[1]: Leaving directory `/root/ACE_wrappers/ace'
make: *** [ACE] Error 2


求高手解答!!!

发表于 2013-10-27 20:17:41 | 显示全部楼层
ACE 和 LINUX的版本?有时候不同的版本可能有兼容性问题,Linux下比较常见。你换个版本看看?
发表于 2013-10-26 17:28:53 | 显示全部楼层
提供一下你的操作步骤序列可以吗?
 楼主| 发表于 2013-10-26 18:55:23 | 显示全部楼层
winston 发表于 2013-10-26 17:28
提供一下你的操作步骤序列可以吗?

嗯,我的操作步骤是这样的
先增加了shell的环境变量,增加以下内容
export PATH=/usr/lib/arm-linux-gnueabihf:/lib/arm-linux-gnueabihf:$PATH
export ACE_ROOT=/root/ACE_wrappers
export MPC_ROOT=$ACE_ROOT/MPC
export LD_LIBRARY_PATH=$ACE_ROOT/ace:$ACE_ROOT/lib:/usr/lib:/lib:$LD_LIBRARY_PATH
然后增加了两个头文件
ln -s ln -s config-linux.h config.h
ln -s platform_linux.GNU platform_macros.GNU

然后make,嗯,好像二进制都编译出来了,最后链接的时间报的错

大致情况就是这样,谢谢
发表于 2013-10-27 11:08:50 | 显示全部楼层
baisaichen 发表于 2013-10-26 18:55
嗯,我的操作步骤是这样的
先增加了shell的环境变量,增加以下内容
export PATH=/usr/lib/arm-linux-gnueab ...
我怎么感觉步骤不太对。我以前好像不是这么弄的。你参考的是安装指南的哪一段说明?ACE的版本、linux的版本?
发表于 2013-10-27 11:11:50 | 显示全部楼层
严格按照Using the Traditional ACE/GNU Configuration试试看。
 楼主| 发表于 2013-10-27 11:23:41 | 显示全部楼层
winston 发表于 2013-10-27 11:11
严格按照Using the Traditional ACE/GNU Configuration试试看。

Using the Traditional ACE/GNU Configuration

Here's what you need to do to build ACE using GNU Make and ACE's traditional per-platform configuration method:

    Install GNU make 3.79.1 or greater on your system (available via http anonymous ftp from ftp.gnu.org in the pub/gnu/make/ directory). You must use GNU make when using ACE's traditional per-platform configuration method or ACE won't compile.
    Add an environment variable called ACE_ROOT that contains the name of the root of the directory where you keep the ACE wrapper source tree. The ACE recursive Makefile scheme needs this information. There are several ways to set the ACE_ROOT variable. For example:

        TSCH/CSH: setenv ACE_ROOT /home/cs/faculty/schmidt/ACE_wrappers

        BASH or Bourne Shell: ACE_ROOT=/home/cs/faculty/schmidt/ACE_wrappers; export ACE_ROOT

    If you're building a number of versions of ACE, however, (e.g., for different OS platforms or for different releases of ACE) you might use the following approach (assuming TCSH/CSH):

        setenv ACE_ROOT $cwd

    Create a configuration file, $ACE_ROOT/ace/config.h, that includes the appropriate platform/compiler-specific header configurations from the ACE source directory. For example:

        #include "ace/config-linux.h"

    The platform/compiler-specific configuration file contains the #defines that are used throughout ACE to indicate which features your system supports. See the $ACE_ROOT/ace/README file for a description of these macro settings. If you desire to add some site-specific or build-specific changes, you can add them to your config.h file; place them before the inclusion of the platform-specific header file.

    There are config files for most versions of UNIX. If there isn't a version of this file that matches your platform/compiler, you'll need to make one. Please send email to the ace-users list if you get it working so it can be added to the master ACE release.
    Create a build configuration file, $ACE_ROOT/include/makeinclude/platform_macros.GNU, that contains the appropriate platform/compiler-specific Makefile configurations, e.g.,

        include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU

    This file contains the compiler and Makefile directives that are platform/compiler-specific. If you'd like to add make options, you can add them before including the platform-specific configuration.

    NOTE! There really is not a # character before 'include' in the platform_macros.GNU file. # is a comment character.
    If you wish to install ACE (using "make install"), set the installation prefix in platform_macros.GNU.

        INSTALL_PREFIX = /usr/local

    Headers will be installed to $INSTALL_PREFIX/include, executables to $INSTALL_PREFIX/bin, documentation and build system files to $INSTALL_PREFIX/share and libraries to $INSTALL_PREFIX/lib. The library directory can be customized by setting INSTALL_LIB (for example, INSTALL_LIB=lib64). With INSTALL_PREFIX set, RPATH will be enabled for all executables and shared libraries. To disable RPATH (for example, if $INSTALL_PREFIX/$INSTALL_LIB is already a system-known location for shared libraries such as those listed in /etc/ld.so.conf), set the make macro install_rpath to 0 by adding install_rpath=0 to platform_macros.GNU.
    Note that because ACE builds shared libraries, you'll need to set LD_LIBRARY_PATH (or equivalent for your platform) to the directory where binary version of the ACE library is built into. For example, you probably want to do something like the following:

        % setenv LD_LIBRARY_PATH $ACE_ROOT/lib:$LD_LIBRARY_PATH

    When all this is done, hopefully all you'll need to do is type:

        % make

    at the ACE_ROOT directory. This will build the ACE library, tests, the examples, and the sample applications. Building the entire ACE release can take a long time and consume lots of disk space, however. Therefore, you might consider cd'ing into the $ACE_ROOT/ace directory and running make there to build just the ACE library. As a sanity check, you might also want to build and run the automated "one-button" tests in $ACE_ROOT/tests. Finally, if you're also planning on building TAO, you should build the gperf perfect hash function generator application in $ACE_ROOT/apps/gperf.
    If you've set the INSTALL_PREFIX before building, now run

        % make install

    If you need to regenerate the ace/Svc_Conf_y.cpp file, you'll need to get GNU Bison. However, you should rarely, if ever, need to do this.


参考的是这一段.....
步骤也是按这个来的,唯一不同的是我用的链接文件config.h和platform_macros.GNU ,不过后来了我又生成了新文件,还是一样,的编译错误
 楼主| 发表于 2013-10-28 22:47:20 | 显示全部楼层
winston 发表于 2013-10-27 20:17
ACE 和 LINUX的版本?有时候不同的版本可能有兼容性问题,Linux下比较常见。你换个版本看看? ...

ACE是6.2.2版...
额,在config.h中定义#define ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS 1
就可以编译通过了....
感谢winston的热心帮助:)

点评

惭愧了,其实没帮上啥忙。这些系统的编译最好认真看看说明,因为编译器、OS、语言都会影响编译结果。  发表于 2013-10-28 23:49
您需要登录后才可以回帖 登录 | 用户注册

本版积分规则

Archiver|手机版|小黑屋|ACE Developer ( 京ICP备06055248号 )

GMT+8, 2024-4-29 07:41 , Processed in 0.016779 second(s), 8 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表