ClamAV-1.4.2 build error on AIX7.3

酒井直也 via clamav-users <[email protected]>
Newsgroups gmane.comp.security.virus.clamav.user
Message-ID <[email protected]>
Hello, I am using ClamAV on AIX 7.3.
Recently, there was an announcement that ClamAV 1.4 will be LTS, so I am 
considering updating ClamAV on my server from 1.0.7 to 1.4.2.

On AIX, the RPM package provided by IBM is already available from the 
"AIX ToolBox" site, where the ClamAV-1.0.7 package is currently offered.
However, since 1.0LTS will end support this year, I would like to use 
the latest LTS version if possible.
(In February, IBM released the official version of RustSDK needed for 
the ClamAV build, so I can try building without participating in the 
Rust beta testing program of AIX.)

Referring to the SPCE file of ClamAV-1.0.7 available from the "AIX 
ToolBox" site, I configured the necessary libraries and settings, and it 
seemed that the build was ready without any particular issues after 
running cmake.
Then I executed "cmake --build .", an error occuered just as the build 
of libclamunrar was completed and linking had started, causing the build 
to stop.
The error messages are as follows;

> [ 13%] Linking CXX shared library libclamunrar.a
> ld: 0706-012 The -- flag is not recognized.
> collect2: error: ld returned 255 exit status
> make: The error code from the last command is 1.
>
> Stop.
> make: The error code from the last command is 2.
>
> Stop.
> make: The error code from the last command is 2.

I know that the ld of AIX does not allow options that start with "--", 
so I can understand what the ld error itself means.
Next, I provided the linker with the "-wl,-v" option to check the 
details, then I found that the following options were passed to ld.

> /usr/bin/ld -b64 -bpT:0x10000000 -bpD:0x20000000 -btextro -bM:SRE 
> -bnoentry -o libclamunrar.so.12 
> /opt/freeware/lib/gcc/powerpc-ibm-aix7.3.0.0/10/pthread/ppc64/crtcxa_64_s.o 
> /tmp//cckv7Vhr.cdtor.o 
> /opt/freeware/lib/gcc/powerpc-ibm-aix7.3.0.0/10/pthread/ppc64/crtdbase_64.o 
> -L/opt/freeware/lib64 -L/opt/freeware/lib -L/usr/local/lib 
>  -L/opt/freeware/lib/gcc/powerpc-ibm-aix7.3.0.0/10/pthread/ppc64 
> -L/opt/freeware/lib/gcc/powerpc-ibm-aix7.3.0.0/10/../../../pthread/ppc64 
>  -L/opt/freeware/lib/gcc/powerpc-ibm-aix7.3.0.0/10 
> -L/opt/freeware/lib/gcc/powerpc-ibm-aix7.3.0.0/10/../../.. 
> -bE:CMakeFiles/clamunrar.dir/exports.exp 
>  --version-script=/admin/clamav-clamav-1.4.2/libclamunrar/libclamunrar.map 
> -blibpath:/usr/local/lib:/usr/lib:/lib -v -lbsd -lcrypt  -bnoipath 
> CMakeFiles/clamunrar.dir/archive.cpp.o 
> CMakeFiles/clamunrar.dir/arcread.cpp.o 
> CMakeFiles/clamunrar.dir/blake2s.cpp.o 
> CMakeFiles/clamunrar.dir/cmddata.cpp.o 
> CMakeFiles/clamunrar.dir/consio.cpp.o 
> CMakeFiles/clamunrar.dir/crc.cpp.o 
> CMakeFiles/clamunrar.dir/crypt.cpp.o 
> CMakeFiles/clamunrar.dir/dll.cpp.o 
> CMakeFiles/clamunrar.dir/encname.cpp.o 
> CMakeFiles/clamunrar.dir/errhnd.cpp.o 
> CMakeFiles/clamunrar.dir/extinfo.cpp.o 
> CMakeFiles/clamunrar.dir/extract.cpp.o 
> CMakeFiles/clamunrar.dir/filcreat.cpp.o 
> CMakeFiles/clamunrar.dir/file.cpp.o 
> CMakeFiles/clamunrar.dir/filefn.cpp.o 
> CMakeFiles/clamunrar.dir/filestr.cpp.o 
> CMakeFiles/clamunrar.dir/find.cpp.o 
> CMakeFiles/clamunrar.dir/getbits.cpp.o 
> CMakeFiles/clamunrar.dir/global.cpp.o 
> CMakeFiles/clamunrar.dir/hash.cpp.o 
> CMakeFiles/clamunrar.dir/headers.cpp.o 
> CMakeFiles/clamunrar.dir/list.cpp.o 
> CMakeFiles/clamunrar.dir/match.cpp.o 
> CMakeFiles/clamunrar.dir/options.cpp.o 
> CMakeFiles/clamunrar.dir/pathfn.cpp.o 
> CMakeFiles/clamunrar.dir/qopen.cpp.o 
> CMakeFiles/clamunrar.dir/rar.cpp.o 
> CMakeFiles/clamunrar.dir/rarvm.cpp.o 
> CMakeFiles/clamunrar.dir/rawread.cpp.o 
> CMakeFiles/clamunrar.dir/rdwrfn.cpp.o 
> CMakeFiles/clamunrar.dir/recvol.cpp.o 
> CMakeFiles/clamunrar.dir/resource.cpp.o 
> CMakeFiles/clamunrar.dir/rijndael.cpp.o 
> CMakeFiles/clamunrar.dir/rs.cpp.o CMakeFiles/clamunrar.dir/rs16.cpp.o 
> CMakeFiles/clamunrar.dir/scantree.cpp.o 
> CMakeFiles/clamunrar.dir/secpassword.cpp.o 
> CMakeFiles/clamunrar.dir/sha1.cpp.o 
> CMakeFiles/clamunrar.dir/sha256.cpp.o 
> CMakeFiles/clamunrar.dir/smallfn.cpp.o 
> CMakeFiles/clamunrar.dir/strfn.cpp.o 
> CMakeFiles/clamunrar.dir/strlist.cpp.o 
> CMakeFiles/clamunrar.dir/system.cpp.o 
> CMakeFiles/clamunrar.dir/threadpool.cpp.o 
> CMakeFiles/clamunrar.dir/timefn.cpp.o 
> CMakeFiles/clamunrar.dir/ui.cpp.o 
> CMakeFiles/clamunrar.dir/unicode.cpp.o 
> CMakeFiles/clamunrar.dir/unpack.cpp.o 
> CMakeFiles/clamunrar.dir/volume.cpp.o 
> -blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/local/lib:/opt/freeware/lib/gcc/powerpc-ibm-aix7.3.0.0/10/pthread/ppc64:/opt/freeware/lib/pthread/ppc64:/opt/freeware/lib/gcc/powerpc-ibm-aix7.3.0.0/10:/usr/lib:/lib: 
>  -lstdc++ -lm -lgcc_s -lpthreads -lc -L/opt/freeware/lib -lgcc_s 
> -binitfini:_GLOBAL__FI_libclamunrar_so:_GLOBAL__FD_libclamunrar_so 
>  -bE:/tmp//ccuVecW4.x

I think the cause of the error is that "--version-script" is being 
specified.
Since I am not familiar with cmake, I have no idea where I should make 
changes to modify this option.

The only flag I am giving to the linker among the options I provide to 
cmake is as follows;

> export LDFLAGS=-Wl,-blibpath:/usr/local/lib:/usr/lib:/lib -Wl,-v 
> -L/opt/freeware/lib64 -L/opt/freeware/lib -L/usr/local/lib -lm -lbsd 
> -lcrypt

I'd like to ask for your help.


-------------------------------

N.Sakai

<[email protected]>

-------------------------------


_______________________________________________

Manage your clamav-users mailing list subscription / unsubscribe:
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/Cisco-Talos/clamav-documentation

https://docs.clamav.net/#mailing-lists-and-chat
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.