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

Build on Linux sparc64 fails with #error "Undefined Architecture." #893

Closed
glaubitz opened this issue Feb 9, 2021 · 5 comments · Fixed by #899
Closed

Build on Linux sparc64 fails with #error "Undefined Architecture." #893

glaubitz opened this issue Feb 9, 2021 · 5 comments · Fixed by #899

Comments

@glaubitz
Copy link
Contributor

glaubitz commented Feb 9, 2021

The build of abseil fails on Linux sparc64 with:

[ 69%] Building CXX object absl/debugging/CMakeFiles/examine_stack.dir/internal/examine_stack.cc.o
cd "/<<PKGBUILDDIR>>/static/absl/debugging" && /usr/bin/c++  -I"/<<PKGBUILDDIR>>" -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wcast-qual -Wconversion-null -Wmissing-declarations -Woverlength-strings -Wpointer-arith -Wundef -Wunused-local-typedefs -Wunused-result -Wvarargs -Wvla -Wwrite-strings -Wno-missing-field-initializers -Wno-sign-compare -DNOMINMAX -std=gnu++14 -o CMakeFiles/examine_stack.dir/internal/examine_stack.cc.o -c "/<<PKGBUILDDIR>>/absl/debugging/internal/examine_stack.cc"
/<<PKGBUILDDIR>>/absl/debugging/internal/examine_stack.cc:72:2: error: #error "Undefined Architecture."
   72 | #error "Undefined Architecture."
      |  ^~~~~
[ 70%] Linking CXX static library libabsl_time.a
cd "/<<PKGBUILDDIR>>/static/absl/time" && /usr/bin/cmake -P CMakeFiles/time.dir/cmake_clean_target.cmake
cd "/<<PKGBUILDDIR>>/static/absl/time" && /usr/bin/cmake -E cmake_link_script CMakeFiles/time.dir/link.txt --verbose=1
/usr/bin/ar qc libabsl_time.a CMakeFiles/time.dir/civil_time.cc.o CMakeFiles/time.dir/clock.cc.o CMakeFiles/time.dir/duration.cc.o CMakeFiles/time.dir/format.cc.o CMakeFiles/time.dir/time.cc.o
/usr/bin/ranlib libabsl_time.a
make[4]: Leaving directory '/<<PKGBUILDDIR>>/static'
[ 70%] Built target time

Full build log in: https://buildd.debian.org/status/fetch.php?pkg=abseil&arch=sparc64&ver=0%7E20200923.3-1&stamp=1612822447&raw=0

A sparc64 porterbox running Debian unstable can be access through the gcc compile farm:

https://gcc.gnu.org/wiki/CompileFarm

@glaubitz glaubitz added the bug label Feb 9, 2021
@derekmauro
Copy link
Member

https://abseil.io/docs/cpp/platforms/platforms - This platform isn't supported, and we can't prioritize fixing issues on this platform. We may accept a patch if it doesn't complicate the code.

@glaubitz
Copy link
Contributor Author

OK, I will take care of those issues in the next days.

glaubitz added a commit to glaubitz/abseil-cpp that referenced this issue Feb 15, 2021
@glaubitz
Copy link
Contributor Author

I have now sent PRs for the issues on m68k, powerpc and sparc64. Will open more PRs for supporting some more targets once these PRs have been merged.

@derekmauro
Copy link
Member

Thanks. Tests have passed and these should be merged soon.

derekmauro pushed a commit that referenced this issue Feb 19, 2021
@roastduck
Copy link

Hi team, I am also encountering this this issue when trying to compile to yet another architecture. I see the error is from a function that is commented with "nullptr if unknown". Can we just return nullptr instead of #error "Undefined Architecture."?

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

Successfully merging a pull request may close this issue.

3 participants