Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fish does not compile with latest glibc/gcc #6604

Closed
ignatenkobrain opened this issue Feb 14, 2020 · 6 comments
Closed

Fish does not compile with latest glibc/gcc #6604

ignatenkobrain opened this issue Feb 14, 2020 · 6 comments
Labels
bug Something that's not working as intended regression Something that used to work, but was broken, especially between releases
Milestone

Comments

@ignatenkobrain
Copy link

/usr/bin/c++  -DBINDIR=L\"/usr/bin\" -DCMAKE_BINARY_DIR=\"/home/brain/rpmbuild/BUILD/fish-3.1.0/x86_64-redhat-linux-gnu\" -DCMAKE_SOURCE_DIR=\"/home/brain/rpmbuild/BUILD/fish-3.1.0\" -DDATADIR=L\"/usr/share\" -DDOCDIR=L\"/usr/share/doc/fish\" -DLOCALEDIR=\"/usr/share/locale\" -DPREFIX=L\"/usr\" -DSYSCONFDIR=L\"/etc\" -D_REENTRANT -D_UNICODE=1 -I. -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdiagnostics-color=always -Wall -Wextra -Wno-implicit-fallthrough -Wno-comment -Wno-address -Wno-strict-aliasing -Wno-redundant-move  -O2 -g    -fno-exceptions -pthread -std=gnu++11 -MD -MT CMakeFiles/fishlib.dir/src/iothread.cpp.o -MF CMakeFiles/fishlib.dir/src/iothread.cpp.o.d -o CMakeFiles/fishlib.dir/src/iothread.cpp.o -c ../src/iothread.cpp
In file included from ../src/iothread.cpp:3:
../src/iothread.h:98:1: error: 'uint64_t' does not name a type
   98 | uint64_t thread_id();
      | ^~~~~~~~
../src/iothread.cpp: In function 'void* func_invoker(void*)':
../src/iothread.cpp:467:11: error: 'thread_id' was not declared in this scope; did you mean 'pthread_t'?
  467 |     (void)thread_id();
      |           ^~~~~~~~~
      |           pthread_t

This is on Fedora with following packages:

glibc-2.31-1.fc32.x86_64
gcc-10.0.1-0.7.fc32.x86_64

Let me know if you need more info.

@faho
Copy link
Member

faho commented Feb 14, 2020

Pretty sure it's just missing a "cstdint" include.

@faho faho added bug Something that's not working as intended regression Something that used to work, but was broken, especially between releases labels Feb 14, 2020
@faho faho added this to the fish 3.1.1 milestone Feb 14, 2020
@ignatenkobrain
Copy link
Author

@faho makes sense, I'll send a PR.

ignatenkobrain added a commit to ignatenkobrain/fish-shell that referenced this issue Feb 14, 2020
This will fix build with GCC 10+.

Fixes: fish-shell#6604
Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
@faho
Copy link
Member

faho commented Feb 14, 2020

No need, I'm pushing a commit.

@ignatenkobrain
Copy link
Author

@faho fair enough, thanks!

@faho faho closed this as completed in d80d39d Feb 14, 2020
@ignatenkobrain
Copy link
Author

@faho your fix is wrong. the definition is in .h file and you've added it in .cpp

@faho
Copy link
Member

faho commented Feb 14, 2020

Blurgh, yeah, sorry.

faho added a commit that referenced this issue Feb 14, 2020
Yeah, this was needed in the *header*.

God I hate headers.

Fixes #6604, for real this time
zanchey pushed a commit that referenced this issue Feb 22, 2020
For uint64_t.

Needed for some configurations with glibc.

Fixes #6604.

(cherry picked from commit d80d39d)
zanchey pushed a commit that referenced this issue Feb 22, 2020
Yeah, this was needed in the *header*.

God I hate headers.

Fixes #6604, for real this time

(cherry picked from commit f79ff72)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something that's not working as intended regression Something that used to work, but was broken, especially between releases
Projects
None yet
Development

No branches or pull requests

2 participants