macOS flat_namespace linker option

安藤慶昭 via omniORB-list <[email protected]> Sun, 14 Nov 2021 14:39:33 +0000
Newsgroups gmane.comp.corba.omniorb.user
Message-ID <TYYPR01MB77607AE9340CF18DBDB0FB81A0919@TYYPR01MB7760.jpnprd01.prod.outlook.com>
Dear Duncan and omniORB users,

I would like to propose removing -flat_namespace linker options for macOS.

I'm currently using omniORB on macOS with Homebrew, and I would like to
update homebrew's formula (build script) for new Python 3.10 update.
However, Homebrew's build check tool (brew audit) returns the following warning.


  * Libraries were compiled with a flat namespace.

    This can cause linker errors due to name collisions, and

    is often due to a bug in detecting the macOS version.

      /usr/local/Cellar/omniorb-ssl/4.2.4/lib/libCOS4.2.4.dylib

      /usr/local/Cellar/omniorb-ssl/4.2.4/lib/libCOSDynamic4.2.4.dylib

      /usr/local/Cellar/omniorb-ssl/4.2.4/lib/libomniCodeSets4.2.4.dylib

      /usr/local/Cellar/omniorb-ssl/4.2.4/lib/libomniConnectionMgmt4.2.4.dylib

      /usr/local/Cellar/omniorb-ssl/4.2.4/lib/libomniDynamic4.2.4.dylib

      /usr/local/Cellar/omniorb-ssl/4.2.4/lib/libomniORB4.2.4.dylib

      /usr/local/Cellar/omniorb-ssl/4.2.4/lib/libomniZIOP4.2.4.dylib

      /usr/local/Cellar/omniorb-ssl/4.2.4/lib/libomniZIOPDynamic4.2.4.dylib

      /usr/local/Cellar/omniorb-ssl/4.2.4/lib/libomnisslTP4.2.4.dylib

      /usr/local/Cellar/omniorb-ssl/4.2.4/lib/libomnithread.4.1.dylib

Now the old technology "flat namespace" only for backward compatibility for
Mac OS X 10.0 (Cheetah) is not recommended and is unnecessary.

http://mirror.informatimago.com/next/developer.apple.com/releasenotes/DeveloperTools/TwoLevelNamespaces.html

Therefore, I suggest modifying the makefile for macOS according to the following patch.

https://github.com/Homebrew/formula-patches/pull/405/files

Python modules require "--undefined dynamic_lookup" option, but other
omniORB libraries can be linked without any "--undefined" options.
I'm using binaries with these modifications applied, but for now, there's nothing wrong with it.

Best regards,
Noriaki Ando

_______________________________________________
omniORB-list mailing list
[email protected]
https://www.omniorb-support.com/mailman/listinfo/omniorb-list