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

[package] gperf/3.1: can't compile with clang and cppstd=17 #5259

Closed
AndreyMlashkin opened this issue Apr 18, 2021 · 2 comments
Closed

[package] gperf/3.1: can't compile with clang and cppstd=17 #5259

AndreyMlashkin opened this issue Apr 18, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@AndreyMlashkin
Copy link
Contributor

Package and Environment Details (include every applicable attribute)

  • Package Name/Version: gperf/3.1
  • Operating System+version: Linux Ubuntu 20.04
  • Compiler+version: clang
  • Docker image: conanio/gcc8
  • Conan version: conan 1.35.1

Conan profile (output of conan profile show default or conan profile show <profile> if custom profile is in use)

[settings]
arch=x86_64
arch_build=x86_64
build_type=Debug
compiler=clang
compiler.cppstd=17
compiler.libcxx=libstdc++11
compiler.version=10
os=Linux
os_build=Linux
[options]
*:shared=False
[build_requires]
[env]
CC=/usr/bin/clang
CXX=/usr/bin/clang++

Steps to reproduce (Include if Applicable)

conan install gperf/3.1@ --build "*"

Logs (Include/Attach if Applicable)

Click to expand log
$ conan install gperf/3.1@ --build "*" -pr clang
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Debug
compiler=clang
compiler.cppstd=17
compiler.libcxx=libstdc++11
compiler.version=10
os=Linux
os_build=Linux
[options]
*:shared=False
[build_requires]
[env]
CC=/usr/bin/clang
CXX=/usr/bin/clang++
gperf/3.1: Forced build from source
Installing package: gperf/3.1
Requirements
    gperf/3.1 from local cache - Cache
Packages
    gperf/3.1:4db1be536558d833e52e862fd84d64d75c2b3656 - Build

Installing (downloading, building) binaries...
gperf/3.1: Copying sources to build folder
gperf/3.1: Building your package in /home/andrei/.conan/data/gperf/3.1/_/_/build/4db1be536558d833e52e862fd84d64d75c2b3656
gperf/3.1: Generator txt created conanbuildinfo.txt
gperf/3.1: Calling build()
gperf/3.1: Calling:
 > ./configure '--prefix=/home/andrei/.conan/data/gperf/3.1/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656' '--bindir=${prefix}/bin' '--sbindir=${prefix}/bin' '--libexecdir=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' '--datarootdir=${prefix}/share' 
checking whether make sets $(MAKE)... yes
configure: creating ./config.status
config.status: creating Makefile
=== configuring in lib (/home/andrei/.conan/data/gperf/3.1/_/_/build/4db1be536558d833e52e862fd84d64d75c2b3656/source_subfolder/lib)
configure: running /bin/bash ./configure --disable-option-checking '--prefix=/home/andrei/.conan/data/gperf/3.1/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656'  '--bindir=${prefix}/bin' '--sbindir=${prefix}/bin' '--libexecdir=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' '--datarootdir=${prefix}/share' --cache-file=/dev/null --srcdir=.
checking whether make sets $(MAKE)... yes
checking for gcc... /usr/bin/clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/clang accepts -g... yes
checking for /usr/bin/clang option to accept ISO C89... none needed
checking how to run the C preprocessor... /usr/bin/clang -E
checking whether we are using the GNU C++ compiler... yes
checking whether /usr/bin/clang++ accepts -g... yes
checking how to run the C++ preprocessor... /usr/bin/clang++ -E
checking for ar... ar
checking for ranlib... ranlib
checking for a BSD compatible install... /usr/bin/install -c
configure: creating ./config.status
config.status: creating Makefile
=== configuring in src (/home/andrei/.conan/data/gperf/3.1/_/_/build/4db1be536558d833e52e862fd84d64d75c2b3656/source_subfolder/src)
configure: running /bin/bash ./configure --disable-option-checking '--prefix=/home/andrei/.conan/data/gperf/3.1/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656'  '--bindir=${prefix}/bin' '--sbindir=${prefix}/bin' '--libexecdir=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' '--datarootdir=${prefix}/share' --cache-file=/dev/null --srcdir=.
checking whether make sets $(MAKE)... yes
checking for gcc... /usr/bin/clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/clang accepts -g... yes
checking for /usr/bin/clang option to accept ISO C89... none needed
checking how to run the C preprocessor... /usr/bin/clang -E
checking whether we are using the GNU C++ compiler... yes
checking whether /usr/bin/clang++ accepts -g... yes
checking how to run the C++ preprocessor... /usr/bin/clang++ -E
checking for a BSD compatible install... /usr/bin/install -c
checking for stack-allocated variable-size arrays... yes
checking for rand in -lm... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
=== configuring in tests (/home/andrei/.conan/data/gperf/3.1/_/_/build/4db1be536558d833e52e862fd84d64d75c2b3656/source_subfolder/tests)
configure: running /bin/bash ./configure --disable-option-checking '--prefix=/home/andrei/.conan/data/gperf/3.1/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656'  '--bindir=${prefix}/bin' '--sbindir=${prefix}/bin' '--libexecdir=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' '--datarootdir=${prefix}/share' --cache-file=/dev/null --srcdir=.
checking whether make sets $(MAKE)... yes
checking for gcc... /usr/bin/clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/clang accepts -g... yes
checking for /usr/bin/clang option to accept ISO C89... none needed
checking how to run the C preprocessor... /usr/bin/clang -E
checking whether we are using the GNU C++ compiler... yes
checking whether /usr/bin/clang++ accepts -g... yes
checking how to run the C++ preprocessor... /usr/bin/clang++ -E
configure: creating ./config.status
config.status: creating Makefile
=== configuring in doc (/home/andrei/.conan/data/gperf/3.1/_/_/build/4db1be536558d833e52e862fd84d64d75c2b3656/source_subfolder/doc)
configure: running /bin/bash ./configure --disable-option-checking '--prefix=/home/andrei/.conan/data/gperf/3.1/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656'  '--bindir=${prefix}/bin' '--sbindir=${prefix}/bin' '--libexecdir=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' '--datarootdir=${prefix}/share' --cache-file=/dev/null --srcdir=.
checking whether make sets $(MAKE)... yes
checking for a BSD compatible install... /usr/bin/install -c
configure: creating ./config.status
config.status: creating Makefile
cd lib; make all
make[1]: Entering directory '/home/andrei/.conan/data/gperf/3.1/_/_/build/4db1be536558d833e52e862fd84d64d75c2b3656/source_subfolder/lib'
/usr/bin/clang -m64 -D_GLIBCXX_USE_CXX11_ABI=1 -I. -c ./getopt.c
/usr/bin/clang -m64 -D_GLIBCXX_USE_CXX11_ABI=1 -I. -c ./getopt1.c
/usr/bin/clang++ -m64 -stdlib=libstdc++ -std=c++17 -D_GLIBCXX_USE_CXX11_ABI=1 -I. -c ./getline.cc
/usr/bin/clang++ -m64 -stdlib=libstdc++ -std=c++17 -D_GLIBCXX_USE_CXX11_ABI=1 -I. -c ./hash.cc
./getline.cc:58:7: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
      register int c = getc (stream);
      ^~~~~~~~~
1 error generated.
make[1]: *** [Makefile:91: getline.o] Error 1
make[1]: Leaving directory '/home/andrei/.conan/data/gperf/3.1/_/_/build/4db1be536558d833e52e862fd84d64d75c2b3656/source_subfolder/lib'
make: *** [Makefile:33: all] Error 2
gperf/3.1: 
gperf/3.1: ERROR: Package '4db1be536558d833e52e862fd84d64d75c2b3656' build failed
gperf/3.1: WARN: Build folder /home/andrei/.conan/data/gperf/3.1/_/_/build/4db1be536558d833e52e862fd84d64d75c2b3656
ERROR: gperf/3.1: Error in build() method, line 66
	self._build_configure()
while calling '_build_configure', line 59
	autotools.make()
	ConanException: Error 2 while executing make -j12

@AndreyMlashkin AndreyMlashkin added the bug Something isn't working label Apr 18, 2021
@madebr
Copy link
Contributor

madebr commented Apr 19, 2021

This is fixed upstream in https://git.savannah.gnu.org/gitweb/?p=gperf.git;a=commitdiff;h=a63b830554920476881837eeacd4a6b507632b19
Feel free to open a pr adding this patch.
(The ChangeLog change will probably cause conflicts, but I think you can move that text to the header of of the patch.

@perseoGI
Copy link
Contributor

perseoGI commented Sep 9, 2024

Hi there!
I'm closing this very old issue because it was resolved in #5835 some time ago.
Happy coding 🐸

@perseoGI perseoGI closed this as completed Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants