Reputation: 51
I have been exporting an Eclipse product and encountering "The ### executable launcher was unable to locate its companion shared library" when the binary launcher is run.
This problem was first encountered when using the standard Eclipse Product Export wizard. I did check the native artifacts option. (Yes I know, It isn't supported ... go tell the Eclipse foundation to remove it from the system then). Having worked around this export issue previously, I plunged in and learned to build my product using Tycho.
Then to my exasperation, having succeeded in getting a build and an apparently complete export I receive the same shared object message on start.
I have spent weeks trying to get product exports from Eclipse that work and am beyond my patience with it now. Clearly this problem is something other than the build system (seems to be a P2 director issue perhaps? Or perhaps something to do with how I specify plugins and features - I don't use features at all). I am at my wits end with what to try next.
Eclipse4 23-12 (previously export worked on 23-09, same .project file but updated .target) on Linux GTK x86. Happy to post my POM files if it helps.
The project build is defined by
parent-project (ORACBuild)
pom.xml
|
+-au.csiro.orac: E4Application plug-in with pom.xml
+-..
+-.. Multiple other plugins (all with own pom.xml)
+-..
|
+-au.csiro.product
|
+ LABX.product
+ pom.xml
The top level pom (parent, common):
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>au.csiro.orac</groupId>
<artifactId>releng</artifactId>
<version>24.04.1-TEST</version>
<packaging>pom</packaging>
<properties>
<tycho.version>4.0.5</tycho.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-director-plugin</artifactId>
<version>${tycho.version}</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho.version}</version>
<extensions>true</extensions>
</plugin>
<!--Enable the replacement of the SNAPSHOT version in the final product configuration-->
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-packaging-plugin</artifactId>
<version>${tycho.version}</version>
<executions>
<execution>
<phase>package</phase>
<id>package-feature</id>
<configuration>
<finalName>
${project.artifactId}_${unqualifiedVersion}.${buildQualifier}</finalName>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho.version}</version>
<configuration>
<!-- Optional set the Java version you are using-->
<executionEnvironment>JavaSE-17</executionEnvironment>
<target>
<file>LABX.target</file>
<!--<file>../target-platform/target-platform.target</file>-->
</target>
<environments>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>macosx</os>
<ws>cocoa</ws>
<arch>x86_64</arch>
</environment>
</environments>
</configuration>
</plugin>
</plugins>
</build>
<modules>
<module>au.csiro.orac.one</module>
</modules>
</project>
The product project POM:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>au.csiro.orac.product</groupId>
<artifactId>au.csiro.orac.product</artifactId>
<packaging>eclipse-repository</packaging>
<name>ORAC1</name>
<parent>
<groupId>ORACBuild</groupId>
<artifactId>ORACBuild</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../ORACBuild</relativePath>
</parent>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-director-plugin</artifactId>
<version>4.0.5</version>
<executions>
<execution>
<!-- install the product using the p2 director -->
<id>materialize-products</id>
<goals>
<goal>materialize-products</goal>
</goals>
</execution>
<execution>
<id>archive-products</id>
<goals>
<goal>archive-products</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
And the E4Application plugin pom:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>au.csiro.orac</groupId>
<artifactId>au.csiro.orac.one</artifactId>
<packaging>eclipse-plugin</packaging>
<name>au.csiro.orac.one</name>
<parent>
<groupId>ORACBuild</groupId>
<artifactId>ORACBuild</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../ORACBuild</relativePath>
</parent>
</project>
I unpack the resulting GTK binary and when it is run, a dialog box with the message 'The ORAC executable launcher was unable to locate its companion shared library'. (Although the project also defines WIN and OSX targets, I have not tried to run them)
I will add the following observations:
The last successful build of this system used Eclipse 23.06 and was done with a product export. In this export, the plugins folder contained 'org.eclipse.equinox.launcher.gtk.linux.x86_64_1.2.700.v20221108-1024/eclipse_11801.so' and four 'libswt*.so' files in configuration/org.eclipse.osgi.
This product is being built using Eclipse 2312. Neither if exported using the export wizard, nor with the Tycho P2 director does it contain '.so' (or DLL or DYLIB) files of any kind.
Upvotes: 0
Views: 96
Reputation: 51
While posting the edits to the original question, it occurred to me to check that the build worked in 23-09, but did not in 23-12. The 23-12 build failed on two separate Eclipse installations. When this was confirmed, I installed a fresh copy of Eclipse 24-03 and ran the build. To my relief, the build does not exhibit the missing shared object problem.
To the best of my ability to test this, it appears that there is a problem with the 23-12 version of Eclipse and the specific build definition that I have. I can't find any bug reports related and am open to suggestions as to why it wouldn't work.
Upvotes: 0