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 abseil/20210324.1: Linker error while using absl::SimpleAtob(absl::string_view, bool *) #5766

Closed
abhijith96 opened this issue Jun 5, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@abhijith96
Copy link

Linker Error while using abseil from conan repository. I have build a simple project using abseil as dependency.

Conan install went smoothly. while building my sample project i got a linker error while using
absl::SimpleAtob function. Rest of the functions in abseil were working correctly.

project link. Here i have made two executable. one of them using absl::SImpleAtob and another using absl::flat_hash_set. The executable using flat hash set builds and runs fine. The problem is only with absl::SimpleAtob function.

Package and Environment Details (include every applicable attribute)

  • Package Name/Version: abseil/20210324.1
  • Operating System+version: Macos Catalina 10.15.6
  • Compiler+version: apple-clang 11.0
  • Conan version: conan 1.36.0
  • Python version: Python 3.9.5
  • cpp standard cpp17
  • generator used: cmake

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


[settings]
os=Macos
os_build=Macos
arch=x86_64
arch_build=x86_64
compiler=apple-clang
compiler.version=11.0
compiler.libcxx=libc++
build_type=Debug
[options]
[build_requires]
[env]

Steps to reproduce (Include if Applicable)

clone the project. do conan install. run cmake. then build the project using make.

Logs (Include/Attach if Applicable)

Click to expand log
Undefined symbols for architecture x86_64:
  "absl::lts_20210324::SimpleAtob(std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool*)", referenced from:
      _main in sample_program_giving_linker_error.cpp.o
ld: symbol(s) not found for architecture x86_64`

@abhijith96 abhijith96 added the bug Something isn't working label Jun 5, 2021
@SpaceIm
Copy link
Contributor

SpaceIm commented Jun 5, 2021

Yes, I can reproduce this issue when C++ standard of consumer project is C++17. Try to set compiler.cppstd to 17 in your profile and build abseil from source.

@abhijith96
Copy link
Author

abhijith96 commented Jun 5, 2021

thank you, it worked. is there a way to do this without setting cpp standard. because some of the packages that i use does not have cpp 17 support.
is there a workaround to do this.

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