Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 866037 - dev-java/java-service-wrapper-3.5.50-r1 - [exec] logger.c: fatal error: gnu/libc-version.h: No such file or directory
Summary: dev-java/java-service-wrapper-3.5.50-r1 - [exec] logger.c: fatal error: gnu/l...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo musl team
URL:
Whiteboard:
Keywords:
: 953265 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-08-22 15:23 UTC by Toralf Förster
Modified: 2025-04-12 23:33 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,18.57 KB, text/plain)
2022-08-22 15:23 UTC, Toralf Förster
Details
dev-java:java-service-wrapper-3.5.50:20220822-151543.log (dev-java:java-service-wrapper-3.5.50:20220822-151543.log,7.27 KB, text/plain)
2022-08-22 15:23 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,235.03 KB, text/plain)
2022-08-22 15:23 UTC, Toralf Förster
Details
environment (environment,133.65 KB, text/plain)
2022-08-22 15:23 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,26.66 KB, application/x-bzip)
2022-08-22 15:23 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,30.72 KB, application/x-bzip)
2022-08-22 15:23 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2022-08-22 15:23:48 UTC
     [exec] <command-line>: warning: "_FORTIFY_SOURCE" redefined
     [exec] <built-in>: note: this is the location of the previous definition
     [exec] <command-line>: warning: "_FORTIFY_SOURCE" redefined
     [exec] <built-in>: note: this is the location of the previous definition
     [exec] logger.c:81:12: fatal error: gnu/libc-version.h: No such file or directory
     [exec]    81 |   #include <gnu/libc-version.h>
     [exec]       |            ^~~~~~~~~~~~~~~~~~~~

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0_musl-j4-20220820-180012

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-gentoo-linux-musl-12.2.0 *
clang/llvm (if any):
clang version 14.0.6
Target: x86_64-gentoo-linux-musl
Thread model: posix
InstalledDir: /usr/lib/llvm/14/bin
/usr/lib/llvm/14
14.0.6
Python 3.10.6
Available Ruby profiles:
  [1]   ruby27 (with Rubygems)
  [2]   ruby31 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.62.1 *
GENTOO_VM=openjdk-bin-17  CLASSPATH="" JAVA_HOME="/opt/openjdk-bin-17.0.3_p7"
JAVACFLAGS="-source 1.8 -target 1.8" COMPILER="javac"
The following VMs are available for generation-2:
1)	Eclipse Temurin JDK 11.0.15_p10 [openjdk-bin-11]
*)	Eclipse Temurin JDK 17.0.3_p7 [openjdk-bin-17]
Available Java Virtual Machines:
  [1]   openjdk-bin-11 
  [2]   openjdk-bin-17  system-vm

php cli:

  HEAD of ::gentoo
commit 6384b502cf449c7d701489c5e252321f348ae9d5
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Mon Aug 22 14:32:01 2022 +0000

    2022-08-22 14:32:01 UTC

emerge -qpvO dev-java/java-service-wrapper
[ebuild  N    ] dev-java/java-service-wrapper-3.5.50  USE="-doc -source -test"
Comment 1 Toralf Förster gentoo-dev 2022-08-22 15:23:49 UTC
Created attachment 800459 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2022-08-22 15:23:50 UTC
Created attachment 800461 [details]
dev-java:java-service-wrapper-3.5.50:20220822-151543.log
Comment 3 Toralf Förster gentoo-dev 2022-08-22 15:23:51 UTC
Created attachment 800463 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2022-08-22 15:23:53 UTC
Created attachment 800465 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2022-08-22 15:23:54 UTC
Created attachment 800467 [details]
etc.portage.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2022-08-22 15:23:55 UTC
Created attachment 800469 [details]
temp.tar.bz2
Comment 7 Agostino Sarubbo gentoo-dev 2024-02-13 08:18:34 UTC
tinderbox_musl has reproduced this issue with version 3.5.50-r1 - Updating summary.
Comment 8 aryan 2025-04-12 22:49:31 UTC
*** Bug 953265 has been marked as a duplicate of this bug. ***
Comment 9 aryan 2025-04-12 23:30:45 UTC
After looking through logger.c it seems we can erase the ifdef LINUX blocks entirely as it only seems to figure out the version of glibc or distribution version.

This isn't a final patch but it compiles it atleast.

--- a/src/c/logger.c
+++ b/src/c/logger.c
@@ -78,7 +78,6 @@
   #include <errno.h>
  #else /* LINUX */
   #include <asm/errno.h>
-  #include <gnu/libc-version.h>
  #endif

 #endif
@@ -4034,7 +4034,7 @@
     currentLogFileName[0] = TEXT('\0'); /* Log file was rolled, so we want to cause a logfile change event. */
 }

-#ifdef LINUX
+#ifndef LINUX
 /**
  * Get description found in a release file.
  *  This function will only check for the first line because there is only one line in these files.
@@ -4160,7 +4160,7 @@
  */
 int doesFtellCauseMemoryLeak() {
     static int result = -1;
-#ifdef LINUX
+#ifndef LINUX
     if (result == -1) {
         if ((isCentos() || isAMI() || isRHEL() || isFedora()) && !wrapperAssertGlibcUserBis(2, 21, 0)){
             result = 1;

I wasn't able to get the patch to apply if I just removed the blocks entirely so I instead just renamed ifdef -> ifndef, which I know it isn't great but hey it compiled.
Comment 10 aryan 2025-04-12 23:33:03 UTC
(In reply to aryan from comment #9)
> After looking through logger.c it seems we can erase the ifdef LINUX blocks
> entirely as it only seems to figure out the version of glibc or distribution
> version.
> 
> This isn't a final patch but it compiles it atleast.
> 
> --- a/src/c/logger.c
> +++ b/src/c/logger.c
> @@ -78,7 +78,6 @@
>    #include <errno.h>
>   #else /* LINUX */
>    #include <asm/errno.h>
> -  #include <gnu/libc-version.h>
>   #endif
> 
>  #endif
> @@ -4034,7 +4034,7 @@
>      currentLogFileName[0] = TEXT('\0'); /* Log file was rolled, so we want
> to cause a logfile change event. */
>  }
> 
> -#ifdef LINUX
> +#ifndef LINUX
>  /**
>   * Get description found in a release file.
>   *  This function will only check for the first line because there is only
> one line in these files.
> @@ -4160,7 +4160,7 @@
>   */
>  int doesFtellCauseMemoryLeak() {
>      static int result = -1;
> -#ifdef LINUX
> +#ifndef LINUX
>      if (result == -1) {
>          if ((isCentos() || isAMI() || isRHEL() || isFedora()) &&
> !wrapperAssertGlibcUserBis(2, 21, 0)){
>              result = 1;
> 
> I wasn't able to get the patch to apply if I just removed the blocks
> entirely so I instead just renamed ifdef -> ifndef, which I know it isn't
> great but hey it compiled.

Of course the final patch would not remove this for glibc systems.