Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 894596

Summary: app-office/libreoffice-7.6.5.2 [java] fails to compile (MUSL-CLANG-SYSTEM): com_sun_star_comp_beans_LocalOfficeWindow.c:33:10: fatal error: jni.h: No such file or directory
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: Gentoo Office Team <office>
Status: CONFIRMED ---    
Severity: normal CC: thymelizabeth, w12101111
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    
Attachments: build.log
musl/gcc emerge --info and build.log

Description Agostino Sarubbo gentoo-dev 2023-02-15 15:08:25 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: app-office/libreoffice-7.4.5.1 fails to compile (MUSL-CLANG-SYSTEM).
Discovered on: amd64 (internal ref: tinderbox_musl)

NOTE:
(MUSL-CLANG-SYSTEM) in the summary means that bug was found on a machine that runs MUSL libc + clang16 but this bug MAY or MAY NOT BE related to musl/clang16.
Comment 1 Agostino Sarubbo gentoo-dev 2023-02-15 15:08:29 UTC
Created attachment 851248 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2023-02-15 15:08:30 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


/var/tmp/portage/app-office/libreoffice-7.4.5.1/work/libreoffice-7.4.5.1/bean/native/unix/com_sun_star_comp_beans_LocalOfficeWindow.c:33:10: fatal error: jni.h: No such file or directory
fatal: not a git repository (or any parent up to mount point /var/tmp)
/var/tmp/portage/app-office/libreoffice-7.4.5.1/work/libreoffice-7.4.5.1/bean/native/unix/com_sun_star_comp_beans_LocalOfficeWindow.c:33:10: fatal error: jni.h: No such file or directory
Comment 3 Elizabeth Doughty 2023-07-10 09:42:38 UTC
This error also occurs on musl/gcc systems.
Comment 4 Elizabeth Doughty 2023-07-10 09:43:29 UTC
Created attachment 865329 [details]
musl/gcc emerge --info and build.log
Comment 5 Agostino Sarubbo gentoo-dev 2024-02-27 14:41:31 UTC
tinderbox_musl has reproduced this issue with version 7.6.5.2 - Updating summary.
Comment 6 12101111 2024-03-09 08:36:37 UTC
A workaround: create those symlinks

/usr/include/jawt.h -> /usr/lib/openjdk-17/include/jawt.h
/usr/include/jawt_md.h -> /usr/lib/openjdk-17/include/linux/jawt_md.h
/usr/include/jni.h -> /usr/lib/openjdk-17/include/jni.h
/usr/include/jni_md.h -> /usr/lib/openjdk-17/include/linux/jni_md.h
/usr/include/jvmti.h -> /usr/lib/openjdk-17/include/jvmti.h
/usr/include/jvmticmlr.h -> /usr/lib/openjdk-17/include/jvmticmlr.h

Maybe another workaround is appending `-I /usr/lib/openjdk-17/include/ -I /usr/lib/openjdk-17/include/linux` to CXXFLAG