mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #5906] build: Error: symbol `fopen64' is already defined (custom time/offset bits) #3129
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#3129
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gotthardp on GitHub (Jul 17, 2023).
Original GitHub issue: https://github.com/netblue30/firejail/issues/5906
I am getting the following error when building firejail against the latest gcc/glibc.
It's due to the defines like bellow, which are not defined by glibc although the functions are available.
dcb5bc0e45/src/libtrace/libtrace.c (L342)The checks introduced were introduced by the commit
a86c4fe93f. It seems those work for musl only.Environment: gcc 13.1.1 / glibc 2.37
Relates to:
@gotthardp commented on GitHub (Jul 17, 2023):
As a workaround it helps to add to
src/libtrace/libtrace.candsrc/libtracelog/libtracelog.c:@kmk3 commented on GitHub (Jul 17, 2023):
Strange, it builds without issues with the same versions on Artix Linux:
What is the distribution and version?
Are you building from latest git version?
Please post the output of the following:
Cc: @reinerh @rusty-snake
Relates to:
@reinerh commented on GitHub (Jul 17, 2023):
Works here as well. Can you please post a full build log, and more details about compiler and glibc?
@gotthardp commented on GitHub (Jul 17, 2023):
It's the Yocto latest master branch. I did some more digging and found that the Yocto build sets two extra
CFLAGS="-D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64, which seem to cause the issue.The following reproduces the issue even on my standard Fedora 38
The documentation of the two macros say "If you define this macro", so it seems to be valid settings.
@reinerh commented on GitHub (Jul 17, 2023):
Thanks, I can reproduce the error with these defines.
@reinerh commented on GitHub (Apr 21, 2024):
Happens now also on Debian on armhf, probably since the time64_t transition.
@vinc17fr commented on GitHub (Jun 6, 2024):
Yes, there are no reasons that a macro is defined for each available function! The patch is definitely wrong. A usual configure test would be needed.
The glibc manual says:
But it is not clear what change
-D_FILE_OFFSET_BITS=64brings on a 64-bit machine like here. In any case, I don't think that the glibc internals have to be documented.Note that without these defines, the
fopen64function is still declared by glibc's<stdio.h>, as this can be seen onwith
gcc -Eandgcc -c(note that_GNU_SOURCEis important and defined bysrc/libtrace/libtrace.cfor firejail).For firejail, the compilation and linking succeed, but I'm wondering whether the behavior could be incorrect, because there is a definition from the glibc and a definition from firejail/libtrace.