Skip to content

Commit 0d5b90e

Browse files
committed
Add gcc builds
1 parent 29bf91e commit 0d5b90e

4 files changed

Lines changed: 43 additions & 11 deletions

File tree

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ If you are using Maven, edit your `pom.xml` file as below:
8686
<!-- Java 8 is supported if you use the following dependency classifier: <classifier>jdk8</classifier> -->
8787
<!-- don't specify the version here -->
8888
</dependency>
89-
<!-- Example linux amd64 ssl1 natives -->
89+
<!-- Example linux amd64 (GCC) ssl1 natives -->
9090
<dependency>
9191
<groupId>it.tdlight</groupId>
9292
<artifactId>tdlight-natives</artifactId>
93-
<classifier>linux_amd64_ssl1</classifier>
93+
<classifier>linux_amd64_gcc_ssl1</classifier>
9494
<!-- don't specify the version here -->
9595
</dependency>
9696
<!-- Example windows amd64 natives -->
@@ -124,8 +124,8 @@ dependencies {
124124
125125
// do not specify the versions on the dependencies below!
126126
implementation group: 'it.tdlight', name: 'tdlight-java' // Java 8 is supported if you use the following dependency classifier: `jdk8`
127-
implementation group: 'it.tdlight', name: 'tdlight-natives', classifier: 'linux_amd64_ssl1'
128-
// Include other native classifiers, for example linux_amd64_ssl3, macos_amd64, ... -->
127+
implementation group: 'it.tdlight', name: 'tdlight-natives', classifier: 'linux_amd64_gcc_ssl1'
128+
// Include other native classifiers, for example linux_amd64_ssl1, linux_amd64_ssl3, macos_amd64, ... -->
129129
}
130130
```
131131

@@ -138,6 +138,8 @@ To use TDLight Java you need to include the native libraries, by specifying one
138138

139139
- `linux_amd64_ssl1`
140140
- `linux_amd64_ssl3`
141+
- `linux_amd64_gcc_ssl1`
142+
- `linux_amd64_gcc_ssl3`
141143
- `linux_arm64_ssl1`
142144
- `linux_arm64_ssl3`
143145
- `linux_ppc64le_ssl3`

bom/pom.xml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<name>TDLight Java BOM</name>
99
<properties>
1010
<revision>3.0.0.0-SNAPSHOT</revision>
11-
<tdlight.natives.version>4.0.427</tdlight.natives.version>
12-
<tdlight.api.version>4.0.397</tdlight.api.version>
11+
<tdlight.natives.version>4.0.436</tdlight.natives.version>
12+
<tdlight.api.version>4.0.406</tdlight.api.version>
1313
<maven.compiler.source>1.8</maven.compiler.source>
1414
<maven.compiler.target>1.8</maven.compiler.target>
1515
</properties>
@@ -90,6 +90,18 @@
9090
<version>${tdlight.natives.version}</version>
9191
<classifier>linux_amd64_ssl3</classifier>
9292
</dependency>
93+
<dependency>
94+
<groupId>it.tdlight</groupId>
95+
<artifactId>tdlight-natives</artifactId>
96+
<version>${tdlight.natives.version}</version>
97+
<classifier>linux_amd64_gcc_ssl1</classifier>
98+
</dependency>
99+
<dependency>
100+
<groupId>it.tdlight</groupId>
101+
<artifactId>tdlight-natives</artifactId>
102+
<version>${tdlight.natives.version}</version>
103+
<classifier>linux_amd64_gcc_ssl3</classifier>
104+
</dependency>
93105
<dependency>
94106
<groupId>it.tdlight</groupId>
95107
<artifactId>tdlight-natives</artifactId>

example/pom.xml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,31 @@
4646
<artifactId>tdlight-natives</artifactId>
4747
<classifier>linux_amd64_ssl1</classifier>
4848
</dependency>
49-
<!--
49+
<dependency>
50+
<groupId>it.tdlight</groupId>
51+
<artifactId>tdlight-natives</artifactId>
52+
<classifier>linux_amd64_gcc_ssl1</classifier>
53+
</dependency>
54+
<dependency>
55+
<groupId>it.tdlight</groupId>
56+
<artifactId>tdlight-natives</artifactId>
57+
<classifier>linux_amd64_ssl3</classifier>
58+
</dependency>
59+
<dependency>
60+
<groupId>it.tdlight</groupId>
61+
<artifactId>tdlight-natives</artifactId>
62+
<classifier>linux_amd64_gcc_ssl3</classifier>
63+
</dependency>
5064
<dependency>
5165
<groupId>it.tdlight</groupId>
5266
<artifactId>tdlight-natives</artifactId>
5367
<classifier>windows_amd64</classifier>
5468
</dependency>
5569
<dependency>
5670
<groupId>it.tdlight</groupId>
57-
<artifactId>macos_amd64</artifactId>
71+
<artifactId>tdlight-natives</artifactId>
72+
<classifier>macos_amd64</classifier>
5873
</dependency>
59-
-->
6074

6175
<!-- log4j logging -->
6276
<dependency>

tdlight-java/src/main/java/it/tdlight/util/Native.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,12 @@ private static void loadLibrary(String libraryName) throws UnsupportedNativeLibr
5858
NativeLibraryLoader.load(staticLibName, cl);
5959
logger.debug("Failed to load {}", String.join(", ", sharedLibNames), e1);
6060
} catch (UnsatisfiedLinkError e2) {
61-
e1.addSuppressed(e2);
62-
throw new UnsupportedNativeLibraryException(e1);
61+
if (e2.getMessage().contains("libc++.so.1: cannot open shared")) {
62+
throw new UnsupportedNativeLibraryException("Install \"libc++\" to use TDLight Java!");
63+
} else {
64+
e1.addSuppressed(e2);
65+
throw new UnsupportedNativeLibraryException(e1);
66+
}
6367
}
6468
}
6569
}

0 commit comments

Comments
 (0)