Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions jvm-packages/create_jni.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ def native_build(cli_args: argparse.Namespace) -> None:
"Windows": ("xgboost4j.dll", "windows"),
"Darwin": ("libxgboost4j.dylib", "macos"),
"Linux": ("libxgboost4j.so", "linux"),
"FreeBSD": ("libxgboost4j.so", "freebsd"),
"SunOS": ("libxgboost4j.so", "solaris"),
}[platform.system()]
arch_folder = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ enum OS {
WINDOWS("windows"),
MACOS("macos"),
LINUX("linux"),
FREEBSD("freebsd"),
SOLARIS("solaris");

final String name;
Expand All @@ -66,6 +67,8 @@ static OS detectOS() {
return WINDOWS;
} else if (os.contains("nux")) {
return LINUX;
} else if (os.contains("freebsd")) {
return FREEBSD;
} else if (os.contains("sunos")) {
return SOLARIS;
} else {
Expand Down Expand Up @@ -152,7 +155,7 @@ static String getLibraryPathFor(OS os, Arch arch, String libName) {
* <p>
* Throws IllegalStateException if the architecture or OS is unsupported.
* <ul>
* <li>Supported OS: macOS, Windows, Linux, Solaris.</li>
* <li>Supported OS: macOS, Windows, Linux, FreeBSD, Solaris.</li>
* <li>Supported Architectures: x86_64, aarch64, sparc.</li>
* </ul>
* Throws UnsatisfiedLinkError if the library failed to load its dependencies.
Expand Down Expand Up @@ -190,6 +193,10 @@ static synchronized void initXGBoost() throws IOException {
"the path for the native library " + libName + " " +
"via the system property " + getPropertyNameForLibrary(libName));
break;
case FREEBSD:
logger.error(failureMessageIncludingOpenMPHint);
logger.error("You may need to install 'libomp.so'");
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In FreeBSD, libomp.so is in base system, no libgomp.so.

break;
case SOLARIS:
logger.error(failureMessageIncludingOpenMPHint);
logger.error("You may need to install 'libgomp.so' (or glibc) via your package " +
Expand Down