-
-
Notifications
You must be signed in to change notification settings - Fork 566
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
Build fails on Debian Jessie #384
Comments
PS: $ cmake --version
cmake version 3.0.2 |
|
OK, let's at least do that. But is it worth thinking about removing this 3.3 only feature instead, to make it more compatible? Does anyone know what the alternative would be? |
Btw jessie is oldoldstable, under "extended LTS" support. It wouldn't be crazy to expect people running such an old system to install a more recent cmake, but still, compatibility is good if we can achieve it. |
I'm not sure why |
The generator expression for the language is to deal with the Swift build system (that definitely does not do the right thing in many ways). Unfortunately, cleaning that up has been slow going. So, at least for the Swift project, the generator expressions are needed. |
Is there a way to work around the issue in cmake without using the newer feature COMPILE_LANGUAGE? |
I think that the way to do that would to not use any |
If this would work and not add too much complexity, I think it would be desirable to make the project buildable on older systems. However, I don't know much about cmake and wouldn't be able to make these changes myself. Any interest in doing a PR? It's either this or changing the required cmake_version. |
I think I can take a stab at it and upload a potential change that can restore the build on older versions. |
The `COMPILE_LANGUAGE` generator expression was introduced in CMake 3.3. Debian Jessie has an older CMake version bundled, which prevents building on that platform without manually building CMake. This uses a more error-prone mechanism of requiring the commonmark developer to explicitly invoke `cmark_add_compile_options` on the target to ensure that the flags are propagated for the targets without using the generator expression. Adding the options unconditionally prevents using CMark in a build with a non-C programming language. Fixes: commonmark#384
The `COMPILE_LANGUAGE` generator expression was introduced in CMake 3.3. Debian Jessie has an older CMake version bundled, which prevents building on that platform without manually building CMake. This uses a more error-prone mechanism of requiring the commonmark developer to explicitly invoke `cmark_add_compile_options` on the target to ensure that the flags are propagated for the targets without using the generator expression. Adding the options unconditionally prevents using CMark in a build with a non-C programming language. Fixes: #384
Changelog: Properly indent block-level contents of list items in man (openembedded#258). commonmark/cmark#258 This handles nested lists as well as items with multiple paragraphs. The change requires addition of a new field block_number_in_list_item to cmark_renderer, but this does not change the public API. Fix quadratic behavior when parsing emphasis (openembedded#389, Nick Wellnhofer). Delimiters can be deleted, so store delimiter positions instead of pointers in openers_bottom. Besides causing undefined behavior when reading a dangling pointer, this could also result in quadratic behavior when parsing emphasis. commonmark/cmark#389 Fix quadratic behavior when parsing smart quotes (openembedded#388, Nick Wellnhofer). Remove matching smart quote delimiters. Otherwise, the same opener could be found over and over, preventing the openers_bottom optimization from kicking in and leading to quadratic behavior when processing lots of quotes. commonmark/cmark#388 Modify CMake configuration so that the project can be built with older versions of CMake (openembedded#384, Saleem Abdulrasool). (In 0.30.0, some features were used that require CMake >= 3.3.) The cost of this backwards compatibility is that developers must now explicitly invoke cmark_add_compile_options when a new compilation target is added. commonmark/cmark#384 Remove a comma at the end of an enumerator list, which was flagged by clang as a C++11 extension. make_man_page.py: use absolute path with CDLL. This avoids the error "file system relative paths not allowed in hardened programs." Include cmark version in cmark(3) man page (instead of LOCAL). Signed-off-by: Wang Mingyu <[email protected]> Signed-off-by: Khem Raj <[email protected]>
Changelog: Properly indent block-level contents of list items in man (openembedded#258). commonmark/cmark#258 This handles nested lists as well as items with multiple paragraphs. The change requires addition of a new field block_number_in_list_item to cmark_renderer, but this does not change the public API. Fix quadratic behavior when parsing emphasis (openembedded#389, Nick Wellnhofer). Delimiters can be deleted, so store delimiter positions instead of pointers in openers_bottom. Besides causing undefined behavior when reading a dangling pointer, this could also result in quadratic behavior when parsing emphasis. commonmark/cmark#389 Fix quadratic behavior when parsing smart quotes (openembedded#388, Nick Wellnhofer). Remove matching smart quote delimiters. Otherwise, the same opener could be found over and over, preventing the openers_bottom optimization from kicking in and leading to quadratic behavior when processing lots of quotes. commonmark/cmark#388 Modify CMake configuration so that the project can be built with older versions of CMake (openembedded#384, Saleem Abdulrasool). (In 0.30.0, some features were used that require CMake >= 3.3.) The cost of this backwards compatibility is that developers must now explicitly invoke cmark_add_compile_options when a new compilation target is added. commonmark/cmark#384 Remove a comma at the end of an enumerator list, which was flagged by clang as a C++11 extension. make_man_page.py: use absolute path with CDLL. This avoids the error "file system relative paths not allowed in hardened programs." Include cmark version in cmark(3) man page (instead of LOCAL). Signed-off-by: Wang Mingyu <[email protected]> Signed-off-by: Khem Raj <[email protected]>
Changelog: Properly indent block-level contents of list items in man (#258). commonmark/cmark#258 This handles nested lists as well as items with multiple paragraphs. The change requires addition of a new field block_number_in_list_item to cmark_renderer, but this does not change the public API. Fix quadratic behavior when parsing emphasis (#389, Nick Wellnhofer). Delimiters can be deleted, so store delimiter positions instead of pointers in openers_bottom. Besides causing undefined behavior when reading a dangling pointer, this could also result in quadratic behavior when parsing emphasis. commonmark/cmark#389 Fix quadratic behavior when parsing smart quotes (#388, Nick Wellnhofer). Remove matching smart quote delimiters. Otherwise, the same opener could be found over and over, preventing the openers_bottom optimization from kicking in and leading to quadratic behavior when processing lots of quotes. commonmark/cmark#388 Modify CMake configuration so that the project can be built with older versions of CMake (#384, Saleem Abdulrasool). (In 0.30.0, some features were used that require CMake >= 3.3.) The cost of this backwards compatibility is that developers must now explicitly invoke cmark_add_compile_options when a new compilation target is added. commonmark/cmark#384 Remove a comma at the end of an enumerator list, which was flagged by clang as a C++11 extension. make_man_page.py: use absolute path with CDLL. This avoids the error "file system relative paths not allowed in hardened programs." Include cmark version in cmark(3) man page (instead of LOCAL). Signed-off-by: Wang Mingyu <[email protected]> Signed-off-by: Khem Raj <[email protected]>
It seems that #385 isn't enough. From within a Docker image launched with
The blocking error should be
|
@compnerd can you see what the problem is here? |
Unfortunately not. Could you please provide the resulting Makefile with the f invalid output? That might help figure out what happens, but I'm not convinced that this is really the same issue anymore. |
@compnerd do you mean |
@mlocati yes, as I cannot tell what the rule is that it is having trouble with. |
@compnerd Here it is: build.make.zip |
Interesting: src/libcmark$<$<BOOL:>:_static>.a: src/CMakeFiles/cmark_static.dir/cmark.c.o Seems like the property is the output name: https://github.com/commonmark/cmark/blob/master/src/CMakeLists.txt#L101 I can try to whip up a patch, but wont be able to test it. Would you mind testing it @mlocati? |
@compnerd Sure! With docker, testing it is a breeze |
Changelog: Properly indent block-level contents of list items in man (#258). commonmark/cmark#258 This handles nested lists as well as items with multiple paragraphs. The change requires addition of a new field block_number_in_list_item to cmark_renderer, but this does not change the public API. Fix quadratic behavior when parsing emphasis (#389, Nick Wellnhofer). Delimiters can be deleted, so store delimiter positions instead of pointers in openers_bottom. Besides causing undefined behavior when reading a dangling pointer, this could also result in quadratic behavior when parsing emphasis. commonmark/cmark#389 Fix quadratic behavior when parsing smart quotes (#388, Nick Wellnhofer). Remove matching smart quote delimiters. Otherwise, the same opener could be found over and over, preventing the openers_bottom optimization from kicking in and leading to quadratic behavior when processing lots of quotes. commonmark/cmark#388 Modify CMake configuration so that the project can be built with older versions of CMake (#384, Saleem Abdulrasool). (In 0.30.0, some features were used that require CMake >= 3.3.) The cost of this backwards compatibility is that developers must now explicitly invoke cmark_add_compile_options when a new compilation target is added. commonmark/cmark#384 Remove a comma at the end of an enumerator list, which was flagged by clang as a C++11 extension. make_man_page.py: use absolute path with CDLL. This avoids the error "file system relative paths not allowed in hardened programs." Include cmark version in cmark(3) man page (instead of LOCAL). Signed-off-by: Wang Mingyu <[email protected]> Signed-off-by: Khem Raj <[email protected]>
Changelog: Properly indent block-level contents of list items in man (#258). commonmark/cmark#258 This handles nested lists as well as items with multiple paragraphs. The change requires addition of a new field block_number_in_list_item to cmark_renderer, but this does not change the public API. Fix quadratic behavior when parsing emphasis (#389, Nick Wellnhofer). Delimiters can be deleted, so store delimiter positions instead of pointers in openers_bottom. Besides causing undefined behavior when reading a dangling pointer, this could also result in quadratic behavior when parsing emphasis. commonmark/cmark#389 Fix quadratic behavior when parsing smart quotes (#388, Nick Wellnhofer). Remove matching smart quote delimiters. Otherwise, the same opener could be found over and over, preventing the openers_bottom optimization from kicking in and leading to quadratic behavior when processing lots of quotes. commonmark/cmark#388 Modify CMake configuration so that the project can be built with older versions of CMake (#384, Saleem Abdulrasool). (In 0.30.0, some features were used that require CMake >= 3.3.) The cost of this backwards compatibility is that developers must now explicitly invoke cmark_add_compile_options when a new compilation target is added. commonmark/cmark#384 Remove a comma at the end of an enumerator list, which was flagged by clang as a C++11 extension. make_man_page.py: use absolute path with CDLL. This avoids the error "file system relative paths not allowed in hardened programs." Include cmark version in cmark(3) man page (instead of LOCAL). Signed-off-by: Wang Mingyu <[email protected]> Signed-off-by: Khem Raj <[email protected]>
It seems that cmark 0.30.0 can't be compiled on Debian Jessie (compilation of cmark 0.29.0 succeeds):
From within a Docker image launched with
docker run --rm -it debian:jessie bash
:The text was updated successfully, but these errors were encountered: