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

jinja2cpp does not support GNU extensions #7289

Closed
mpusz opened this issue Sep 14, 2021 · 1 comment
Closed

jinja2cpp does not support GNU extensions #7289

mpusz opened this issue Sep 14, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@mpusz
Copy link
Contributor

mpusz commented Sep 14, 2021

Trying to run

conan install jinja2cpp/1.2.1@ -pr gcc8 -s compiler.cppstd=gnu17 -b missing

fails with:

-- infix: EXPECTED-LITE target: expected-lite
-- infix: VARIANT-LITE target: variant-lite
-- infix: OPTIONAL-LITE target: optional-lite
-- infix: STRING-VIEW-LITE target: string-view-lite
-- Configuring done
CMake Error in source_subfolder/CMakeLists.txt:
  Target "jinja2cpp" requires the language dialect "CXXgnu17" (with compiler
  extensions), but CMake does not know the compile flags to use to enable it.


-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_EXPORT_NO_PACKAGE_REGISTRY


CMake Generate step failed.  Build files cannot be regenerated correctly.
jinja2cpp/1.2.1: 
jinja2cpp/1.2.1: ERROR: Package '84516759796ff5640adc0609f1f04e809ffe76db' build failed
jinja2cpp/1.2.1: WARN: Build folder /home/mpusz/.conan/data/jinja2cpp/1.2.1/_/_/build/84516759796ff5640adc0609f1f04e809ffe76db
ERROR: jinja2cpp/1.2.1: Error in build() method, line 96
        cmake = self._configure_cmake()
while calling '_configure_cmake', line 88
        self._cmake.configure(build_folder=self._build_subfolder)
        ConanException: Error 1 while executing cd '/home/mpusz/.conan/data/jinja2cpp/1.2.1/_/_/build/84516759796ff5640adc0609f1f04e809ffe76db/build_subfolder' && cmake -G "Ninja" -DCMAKE_BUILD_TYPE="Release" -DCONAN_CMAKE_CXX_STANDARD="17" -DCONAN_CMAKE_CXX_EXTENSIONS="ON" -DCONAN_STD_CXX_FLAG="-std=gnu++17" -DCONAN_IN_LOCAL_CACHE="ON" -DCONAN_COMPILER="gcc" -DCONAN_COMPILER_VERSION="8" -DCONAN_CXX_FLAGS="-m64" -DCONAN_SHARED_LINKER_FLAGS="-m64" -DCONAN_C_FLAGS="-m64" -DCONAN_LIBCXX="libstdc++11" -DBUILD_SHARED_LIBS="OFF" -DCMAKE_INSTALL_PREFIX="/home/mpusz/.conan/data/jinja2cpp/1.2.1/_/_/package/84516759796ff5640adc0609f1f04e809ffe76db" -DCMAKE_INSTALL_BINDIR="bin" -DCMAKE_INSTALL_SBINDIR="bin" -DCMAKE_INSTALL_LIBEXECDIR="bin" -DCMAKE_INSTALL_LIBDIR="lib" -DCMAKE_INSTALL_INCLUDEDIR="include" -DCMAKE_INSTALL_OLDINCLUDEDIR="include" -DCMAKE_INSTALL_DATAROOTDIR="share" -DCONAN_CMAKE_POSITION_INDEPENDENT_CODE="ON" -DCMAKE_MODULE_PATH="/home/mpusz/.conan/data/jinja2cpp/1.2.1/_/_/build/84516759796ff5640adc0609f1f04e809ffe76db" -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY="ON" -DCONAN_EXPORTED="1" -DJINJA2CPP_BUILD_TESTS="False" -DJINJA2CPP_STRICT_WARNINGS="False" -DJINJA2CPP_BUILD_SHARED="False" -DJINJA2CPP_DEPS_MODE="conan-build" -DJINJA2CPP_CXX_STANDARD="gnu17" -Wno-dev '/home/mpusz/.conan/data/jinja2cpp/1.2.1/_/_/build/84516759796ff5640adc0609f1f04e809ffe76db'

which is caused by the:

self._cmake.definitions["JINJA2CPP_CXX_STANDARD"] = self.settings.compiler.get_safe("cppstd", 14)

and:

https://github.com/jinja2cpp/Jinja2Cpp/blob/4b86a7cecb038614a55b65cca94d9fb56b723d78/CMakeLists.txt#L232-L234

Conan profile

$ conan profile show gcc8
Configuration for profile gcc8:

[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=8
compiler.libcxx=libstdc++11
build_type=Release
[options]
[conf]
[build_requires]
[env]
CXX=/usr/bin/g++-8
CC=/usr/bin/gcc-8
CONAN_CMAKE_GENERATOR=Ninja
@mpusz mpusz added the bug Something isn't working label Sep 14, 2021
@perseoGI
Copy link
Contributor

Hi there,
I was reviewing old issues and I have come across this one.
I'm closing this issue as this was resolved in #20520

Happy coding 🐸

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

2 participants