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

swig_installer/4.0.1: Could NOT find SWIG (missing: SWIG_DIR) #1174

Closed
rea-yseop opened this issue Apr 17, 2020 · 3 comments · Fixed by conan-io/conan-center-index#1717
Closed
Labels

Comments

@rea-yseop
Copy link

Package and Environment Details (include every applicable attribute)

  • Package Name/Version: swig_installer/4.0.1
  • Operating System+version: Linux Ubuntu 18.04
  • Compiler+version: GCC 8
  • Conan version: conan 1.19.1
  • Python version: Python 3.7.4

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

[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=8
compiler.libcxx=libstdc++
build_type=Release
[options]
[build_requires]
[env]

Steps to reproduce (Include if Applicable)

In a CMake file:

find_package(swig_installer REQUIRED)
find_package(SWIG 4 REQUIRED)

Logs (Include/Attach if Applicable)

Click to expand log
CMake Error at /usr/local/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find SWIG (missing: SWIG_DIR) (Required is at least version "4")
Call Stack (most recent call first):
  /usr/local/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/share/cmake-3.15/Modules/FindSWIG.cmake:64 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  swig/CMakeLists.txt:20 (find_package)

FindSwig.cmake uses the following command

if(SWIG_EXECUTABLE)
  execute_process(COMMAND ${SWIG_EXECUTABLE} -swiglib
    OUTPUT_VARIABLE SWIG_swiglib_output
    ERROR_VARIABLE SWIG_swiglib_error
    RESULT_VARIABLE SWIG_swiglib_result)

which later fills SWIG_DIR.

However the given path is wrong (conan instead of rea) resulting with the above error.

${SWIG_EXECUTABLE} =  /home/rea/.conan/data/swig_installer/4.0.1/bincrafters/stable/package/44fcf6b9a7fb86b2586303e3db40189d3b511830/bin/swig

${SWIG_swiglib_output} = /home/conan/.conan/data/swig_installer/4.0.1/bincrafters/stable/package/44fcf6b9a7fb86b2586303e3db40189d3b511830/share/swig/4.0.1
@madebr
Copy link
Contributor

madebr commented May 23, 2020

@rea-yseop
This recipe will soon be available on CCI (conan-io/conan-center-index#1717)

@madebr
Copy link
Contributor

madebr commented May 23, 2020

Look at its test_package, I have added a working cmake example.
It is currently not used in the conanfile because cci has currently no python recipe yet.

@rea-yseop
Copy link
Author

This works. Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants