Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tycho 4.0.4 - macOS builds - Error message when product is launched: unable to locate its companion shared library. #3272

Open
minduch opened this issue Dec 16, 2023 · 4 comments

Comments

@minduch
Copy link

minduch commented Dec 16, 2023

Under macOS Sonoma (14.2), everthing has been going on fine for a long time. I guess that updated to Xcode 5.1 could be a potential cause. Our product built is called "iiziGo" and includes most of Eclipse itself and the JustJ runtime version 21.0.1. It doesn't matter if we build the Aarch64 or the x86_64 versions, they behave the same way.

We notarize our builds with Apple and this works fine. Then we just can't start them. The error message is The iiziGo executable launcher was unable to locate its companion shared library.

Screenshot 2023-12-16 at 12 08 21

If I open the contents of iiziGo.app, and open a Command Line window, and launch the executable "Contents/MacOS/iiziGo", the following is shown:

dlopen(/Users/minduch/Desktop/iiziGo.app/Contents/MacOS//../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.aarch64_1.2.800.v20231003-1442/eclipse_11802.so, 0x0002): tried: '/Users/minduch/Desktop/iiziGo.app/Contents/MacOS//../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.aarch64_1.2.800.v20231003-1442/eclipse_11802.so' (code signature in <54FB69D1-09AC-3055-ADED-430F6E61A20D> '/Users/minduch/Desktop/iiziGo.app/Contents/Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.aarch64_1.2.800.v20231003-1442/eclipse_11802.so' not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs), '/System/Volumes/Preboot/Cryptexes/OS/Users/minduch/Desktop/iiziGo.app/Contents/MacOS//../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.aarch64_1.2.800.v20231003-1442/eclipse_11802.so' (no such file), '/Users/minduch/Desktop/iiziGo.app/Contents/MacOS//../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.aarch64_1.2.800.v20231003-1442/eclipse_11802.so' (code signature in <54FB69D1-09AC-3055-ADED-430F6E61A20D> '/Users/minduch/Desktop/iiziGo.app/Contents/Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.aarch64_1.2.800.v20231003-1442/eclipse_11802.so' not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs), '/Users/minduch/Desktop/iiziGo.app/Contents/Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.aarch64_1.2.800.v20231003-1442/eclipse_11802.so' (code signature in <54FB69D1-09AC-3055-ADED-430F6E61A20D> '/Users/minduch/Desktop/iiziGo.app/Contents/Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.aarch64_1.2.800.v20231003-1442/eclipse_11802.so' not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs), '/System/Volumes/Preboot/Cryptexes/OS/Users/minduch/Desktop/iiziGo.app/Contents/Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.aarch64_1.2.800.v20231003-1442/eclipse_11802.so' (no such file), '/Users/minduch/Desktop/iiziGo.app/Contents/Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.aarch64_1.2.800.v20231003-1442/eclipse_11802.so' (code signature in <54FB69D1-09AC-3055-ADED-430F6E61A20D> '/Users/minduch/Desktop/iiziGo.app/Contents/Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.aarch64_1.2.800.v20231003-1442/eclipse_11802.so' not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs) 2023-12-16 12:14:54.959 iiziGo[2365:142549] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.

I did a new build, this time without Apple Notarization, but the problem remains (when executing iiziGo):

dlopen(/Users/minduch/Desktop/iiziGo.app/Contents/MacOS//../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.aarch64_1.2.800.v20231003-1442/eclipse_11802.so, 0x0002): tried: '/Users/minduch/Desktop/iiziGo.app/Contents/MacOS//../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.aarch64_1.2.800.v20231003-1442/eclipse_11802.so' (code signature in <54FB69D1-09AC-3055-ADED-430F6E61A20D> '/Users/minduch/Desktop/iiziGo.app/Contents/Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.aarch64_1.2.800.v20231003-1442/eclipse_11802.so' not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs), '/System/Volumes/Preboot/Cryptexes/OS/Users/minduch/Desktop/iiziGo.app/Contents/MacOS//../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.aarch64_1.2.800.v20231003-1442/eclipse_11802.so' (no such file), '/Users/minduch/Desktop/iiziGo.app/Contents/MacOS//../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.aarch64_1.2.800.v20231003-1442/eclipse_11802.so' (code signature in <54FB69D1-09AC-3055-ADED-430F6E61A20D> '/Users/minduch/Desktop/iiziGo.app/Contents/Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.aarch64_1.2.800.v20231003-1442/eclipse_11802.so' not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs), '/Users/minduch/Desktop/iiziGo.app/Contents/Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.aarch64_1.2.800.v20231003-1442/eclipse_11802.so' (code signature in <54FB69D1-09AC-3055-ADED-430F6E61A20D> '/Users/minduch/Desktop/iiziGo.app/Contents/Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.aarch64_1.2.800.v20231003-1442/eclipse_11802.so' not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs), '/System/Volumes/Preboot/Cryptexes/OS/Users/minduch/Desktop/iiziGo.app/Contents/Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.aarch64_1.2.800.v20231003-1442/eclipse_11802.so' (no such file), '/Users/minduch/Desktop/iiziGo.app/Contents/Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.aarch64_1.2.800.v20231003-1442/eclipse_11802.so' (code signature in <54FB69D1-09AC-3055-ADED-430F6E61A20D> '/Users/minduch/Desktop/iiziGo.app/Contents/Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.aarch64_1.2.800.v20231003-1442/eclipse_11802.so' not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs) 2023-12-16 12:56:15.194 iiziGo[2589:163401] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.

Interesting!

Now what is interesting, is that if I take the UNMODIFIED .tar.gz file from the Tycho P2 Director, then of course it starts just fine. The problem we are always having with the macOS builds is that our program name "iiziGo" is ALWAYS changed by the P2 director to "IiziGo" (capitalized first letter).

Then there are a number of entries wrongly defined in the app-included Info.plist.

Is there a way of fixing these issues marked with *** below during the build process, and if so how?

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<plist version="1.0">
  <dict>
    <key>NSRequiresAquaSystemAppearance</key>
    <true/>
    <key>CFBundleExecutable</key>
    <string>iiziGo</string>
    <key>CFBundleGetInfoString</key>
***    <string>Eclipse 4.30 for Mac OS X, Copyright IBM Corp. and others 2002, 2023. All rights reserved.</string> ***
    <key>CFBundleIconFile</key>
    <string>icon.icns</string>
    <key>CFBundleIdentifier</key>
    <string>com.iizigo.product</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
***    <string>IiziGo</string> ***
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>4.0.0</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>4.0.0.17406</string>
    <key>NSHighResolutionCapable</key>
    <true/>
    <key>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>Eclipse</key>
    <array>
      <string>-keyring</string>
      <string>~/.eclipse_keyring</string>
    </array>
    <key>CFBundleDisplayName</key>
***    <string>IiziGo</string> ***
  </dict>
</plist>
@laeubi
Copy link
Member

laeubi commented Dec 16, 2023

The problem we are always having with the macOS builds is that our program name "iiziGo" is ALWAYS changed by the P2 director to "IiziGo" (capitalized first letter).

I assume that there is "something" that requires a first capital letter and that's why you are getting issue without, as you already noted this kind of transformation is done by p2 so it must be fixed there:

https://github.com/eclipse-equinox/p2

Maybe also Equinox (what makes the launcher) has something to do:

https://github.com/eclipse-equinox/equinox

I'm sadly not familiar enough with mac to help any further I can only tell that mac is special handled by p2/Equinox

@minduch
Copy link
Author

minduch commented Dec 17, 2023

Would you, @vogella, have some good info about this. This are very old cases for the macOS builds that still are not addressed today (e.g. https://bugs.eclipse.org/bugs/show_bug.cgi?id=339526 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=338148).

And then we have the issues with signing code with different sources. So it becomes really frustrating!

Probably https://bugs.eclipse.org/bugs/show_bug.cgi?id=338148 would have to be reopened as it is still not fixed.

@laeubi
Copy link
Member

laeubi commented Dec 17, 2023

Bugzilla is dead so if you thin any issues are left its best to just open a fresh issue (maybe reference the old one) and describe what needs to be done today. Of course a small testcase to reproduce the problem is always a good idea.

@nik-jo
Copy link

nik-jo commented Mar 22, 2024

I'm getting the same error for my executable built by maven/tycho on Linux Red Hat 8. Was this ever resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants