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

Error while building Clamav in AIX - Powerpc64 #1345

Open
KamathForAIX opened this issue Aug 20, 2024 · 2 comments
Open

Error while building Clamav in AIX - Powerpc64 #1345

KamathForAIX opened this issue Aug 20, 2024 · 2 comments

Comments

@KamathForAIX
Copy link
Contributor

Describe the bug

I am building Clamav for the AIX operating system on the PowerPC platform.

In AIX we need to pass bbigtoc flag to linker or mcmodel=large flag when the TOC is large via RUSTFLAGS.

More about TOC can be read here.

This causes the below error.

Any inputs to resolve this? It will be of help.

rror: failed to run rustc to learn about target-specific information

Caused by:
  process didn't exit successfully: `rustc - --crate-name ___ --print=file-names '-C\' 'link-arg=-bbigtoc\' -g --target powerpc64-ibm-aix --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg` (exit status: 1)
  --- stderr
  error: unknown codegen option: `\`

How to reproduce the problem

Build Clamav on AIX with the below steps.

cmake  . -B build -D CMAKE_INSTALL_PREFIX=$PWD/install_dir -D ENABLE_JSON_SHARED=OFF -D JSONC_INCLUDE_DIR=/opt/freeware/include/json-c  -D JSONC_LIBRARY=/opt/freeware/lib/libjson-c.a -D ENABLE_TESTS=OFF  -DCMAKE_AIX_SHARED_LIBRARY_ARCHIVE=ON -DZLIB_INCLUDE_DIR=/opt/freeware/include/zlib.h -DZLIB_LIBRARY=/opt/freeware/lib/libz.a -DLIBXML2_LIBRARY=/opt/freeware/lib/libxml2.a -DLIBXML2_INCLUDE_DIR=/opt/freeware/include/libxml2/ -DPCRE2_LIBRARIES=/opt/freeware/lib/libpcre2-posix.a -DPCRE2_INCLUDE_DIR=/opt/freeware/include/pcre2.h -DRUSTFLAGS="-C link-arg=-bbigtoc "


cmake --build build -j 4
cmake --install build
@micahsnyder
Copy link
Contributor

It sounds similar to this issue rust-lang/rust#59142

Do you have some thing in a RUSTFLAGS environment variable that would cause this? For ClamAV 1.4.0, we added a change so that the RUSTFLAGS environment variable is passed through CMake to rustc: #1301

@KamathForAIX
Copy link
Contributor Author

No we do not have anything in RUSTFLAGS environment variable. Somehow a '/' gets added for a space. Not sure why. We are passing RUSTFLAGS through cmake only.

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

No branches or pull requests

2 participants