OpenDDS / OpenDDS

OpenDDS is an open source C++ implementation of the Object Management Group (OMG) Data Distribution Service (DDS). OpenDDS also supports Java bindings through JNI.
http://www.opendds.org
Other
1.29k stars 465 forks source link

MacOSX Sierra problems configuring with a prefix on 3.11 #695

Closed dmorilha closed 6 years ago

dmorilha commented 6 years ago

When configuring OpenDDS with the --prefix option. The Makefile's target install does not actually install anything and the command simply returns make: 'install' is up to date. Also I get the following misconfiguration into the Makefiles that I use sed to fix:

ld: unknown option: -R/usr/local/lib
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [libACE.dylib] Error 1
make: *** [ACE] Error 2
mitza-oci commented 6 years ago

Looks like ACE doesn't support make install on macOS. What's the sed command you're using?

Based on your other issue, you're using the Java bindings. If you're only using Java, you could skip make install and just copy the jar and shared library files.

hegyibalint commented 6 years ago

The issue is still present in 3.12 on macOS Sierra. Is there any progress with this issue?

mitza-oci commented 6 years ago

I think it may be fixed in a newer ACE version. Try configure --doc_group from a completely clean build directory.

hegyibalint commented 6 years ago

Sadly it's not working, still getting the make: 'install' is up to date. message after calling make install using release 3.12, or the master branch.

To give a little context, I would like to build OpenDDS with Java binding on macOS 10.12.6. I have tried the following configurations ./configure --prefix=/usr/local ./configure --java --prefix=/usr/local ./configure --doc_group --prefix=/usr/local ./configure --doc_group --java --prefix=/usr/local and building with both Apple's make GNU Make 3.81 and brew's GNU Make 4.2.1, still no luck.

mitza-oci commented 6 years ago

Are you also seeing the error message ld: unknown option: -R/usr/local/lib, same as the other user on this thread? I've also seen the error clang: error: no such file or directory: '<your prefix>/lib' when attempting a macOS build. It would help if you could show the command that failed and the error message.

There is nothing we can do in the OpenDDS repository to fix this, as it's controlled by ACE. We can help you get a patch integrated into the DOCGroup repository.

mitza-oci commented 6 years ago

Please try the change on this PR and let us know if it works for you: https://github.com/DOCGroup/ACE_TAO/pull/524

hegyibalint commented 6 years ago

Meanwhile, I can reproduce the error with ./configure --java --prefix=/usr/local, and building with either make, or gmake.

The failed command log is:

clang++ -dynamiclib -install_name @rpath/libACE.dylib -o libACE.dylib .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/Null_Mutex.o .shobj/Obchunk.o .shobj/Obstack.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_devctl.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 -m64 -flat_namespace -rpath @executable_path/. -rpath @executable_path/"../lib" -L../lib -L.  -L../lib  -Wl,-R/usr/local/lib
ld: unknown option: -R/usr/local/lib
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [libACE.dylib] Error 1
make: *** [ACE] Error 2
mitza-oci commented 6 years ago

That's exactly what's fixed using the code on the ACE_TAO pull request I mentioned before. The -R option no longer appears in the makefile when you use that pull request.

hegyibalint commented 6 years ago

I can confirm the pull request solves the linker problem, but the install problem still persists. Also I have noticed when I'm trying to run make install just after configuring (which should build OpenDDS right away), make instantly returns make: 'install' is up to date.

mitza-oci commented 6 years ago

That's the case-insensitive filesystem interacting unexpectedly with make. Try removing/renaming the INSTALL file in the $DDS_ROOT directory.

For a long-term fix the generated makefile should use .PHONY for these targets.

hegyibalint commented 6 years ago

Well, this was an unexpectedly easy fix 👍 Now OpenDDS compiles and installs from the master branch with the ACE-TAO used in the pull request mentioned earlier.

mitza-oci commented 6 years ago

Changes (including .PHONY) are now merged upstream to master of https://github.com/DOCGroup/ACE_TAO