question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[bug] conan install serf fails in ConanFile.run()

See original GitHub issue

When attempting to install the serf library e.g. with conan install serf/1.3.9@ --build=serf The build fails with the following error message:

[...]
serf/1.3.9: Generator txt created conanbuildinfo.txt
serf/1.3.9: Aggregating env generators
serf/1.3.9: Calling build()
Warning:  ignoring -m option
usage: scons [OPTION] [TARGET] ...

SCons Error: no such option: -6
serf/1.3.9:
serf/1.3.9: ERROR: Package 'de0d7a09fb3ef801ded4c3cc223c5928a5f42e36' build failed
serf/1.3.9: WARN: Build folder /home/myuser/.conan/data/serf/1.3.9/_/_/build/de0d7a09fb3ef801ded4c3cc223c5928a5f42e36
ERROR: serf/1.3.9: Error in build() method, line 111
        self.run("scons {} {}".format(" ".join(escape_str(s) for s in args), " ".join("{}={}".format(k, escape_str(v)) for k, v in kwargs.items())), run_environment=True)
        ConanException: Error 2 while executing scons "-Y" "/home/myuser/.conan/data/serf/1.3.9/_/_/build/de0d7a09fb3ef801ded4c3cc223c5928a5f42e36/source_subfolder" APR="/home/myuser/.conan/data/apr/1.7.0/_/_/package/435690f0682a7e600daf767c97acf6f625b77db0" APU="/home/myuser/.conan/data/apr-util/1.6.1/_/_/package/15462a466576cd30e6c375ccf92dc4b262749330" OPENSSL="/home/myuser/.conan/data/openssl/1.1.1g/_/_/package/6af9cc7cb931c5ad942174fd7838eb655717c709" PREFIX="/home/myuser/.conan/data/serf/1.3.9/_/_/package/de0d7a09fb3ef801ded4c3cc223c5928a5f42e36" LIBDIR="/home/myuser/.conan/data/serf/1.3.9/_/_/package/de0d7a09fb3ef801ded4c3cc223c5928a5f42e36/lib" ZLIB="/home/myuser/.conan/data/zlib/1.2.11/_/_/package/6af9cc7cb931c5ad942174fd7838eb655717c709" DEBUG="False" APR_STATIC="True" CFLAGS="-fPIC -m64 -O3 -s" LINKFLAGS=" -L'/home/myuser/.conan/data/apr-util/1.6.1/_/_/package/15462a466576cd30e6c375ccf92dc4b262749330/lib' -L'/home/myuser/.conan/data/zlib/1.2.11/_/_/package/6af9cc7cb931c5ad942174fd7838eb655717c709/lib' -L'/home/myuser/.conan/data/openssl/1.1.1g/_/_/package/6af9cc7cb931c5ad942174fd7838eb655717c709/lib' -L'/home/myuser/.conan/data/apr/1.7.0/_/_/package/435690f0682a7e600daf767c97acf6f625b77db0/lib' -L'/home/myuser/.conan/data/libiconv/1.16/_/_/package/6af9cc7cb931c5ad942174fd7838eb655717c709/lib' -L'/home/myuser/.conan/data/expat/2.4.1/_/_/package/c215f67ac7fc6a34d9d0fb90b0450016be569d86/lib'" CPPFLAGS="-DXML_STATIC -DAPR_DECLARE_STATIC -DAPU_DECLARE_STATIC -DNDEBUG -I'/home/myuser/.conan/data/apr-util/1.6.1/_/_/package/15462a466576cd30e6c375ccf92dc4b262749330/include' -I'/home/myuser/.conan/data/zlib/1.2.11/_/_/package/6af9cc7cb931c5ad942174fd7838eb655717c709/include' -I'/home/myuser/.conan/data/openssl/1.1.1g/_/_/package/6af9cc7cb931c5ad942174fd7838eb655717c709/include' -I'/home/myuser/.conan/data/apr/1.7.0/_/_/package/435690f0682a7e600daf767c97acf6f625b77db0/include' -I'/home/myuser/.conan/data/libiconv/1.16/_/_/package/6af9cc7cb931c5ad942174fd7838eb655717c709/include' -I'/home/myuser/.conan/data/expat/2.4.1/_/_/package/c215f67ac7fc6a34d9d0fb90b0450016be569d86/include'" CC="gcc" SOURCE_LAYOUT="False"

However if I c&p the problematic scons command into my bash terminal, it runs fine and builds libserf as expected. Apparently, somewhere downstream the parameters are spoiled, so that the command fails. Btw, for the sake of testing I have printed the scons command that is passed to self.run() to the screen, c&p of this also works fine. I’m not sure where the -6 that scons complains about it coming from. This looks like a bug to me.

Environment Details (include every applicable attribute)

  • Operating System+version: WSL2 + RHEL7.9
  • Compiler+version: gcc 9.3.0 (WSL2), 9.2.0 (RHEL7)
  • Conan version: 1.43.2 (WSL2), 1.45.0 (RHEL7)
  • Python version: 3.8.10 (WSL2), 3.9.0 (RHEL7)

Steps to reproduce (Include if Applicable)

conan install serf/1.3.9@ --build=serf

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
uilianriescommented, Feb 8, 2022

I created the PR https://github.com/conan-io/conan-center-index/pull/9301 on Conan Center Index to update scons version and validate this situation.

1reaction
uilianriescommented, Feb 8, 2022

Opened the issue https://github.com/conan-io/conan-center-index/issues/9308 asking for scons fix

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting — conan 1.46.2 documentation
ERROR: Missing prebuilt package¶. When installing packages (with conan install or conan create) it is possible that you get an error like the...
Read more >
getting error while installing build in conanfiles - Stack Overflow
The error message clearly says what's wrong: First argument of CMake() has to be ConanFile. Use CMake(self). You are passing self.settings ...
Read more >
git – Schneide Blog
Reading a conanfile.txt from a conanfile.py ... If you are running GitLab you get some nice features in combination with the Jenkins Gitlab...
Read more >
Change Log - The Dark Mod Bugtracker
0005174: [Design/Coding] Loading error caused by non-Latin character in filename ... OpenGLModule::assertNoErrors() runs into an endless loop until your ...
Read more >
JSON: JSON For Modern C++ - Morioh
For GCC running on MinGW or Android SDK, the error 'to_string' is not a member of 'std' ... If you are using Conan...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found