Re: Compiling with -m32 on OS X

Brandon Perry <[email protected]>
Newsgroups gmane.comp.security.virus.clamav.devel
Message-ID <[email protected]>
> On Jan 23, 2016, at 10:37 AM, Brandon Perry <[email protected]> wrote:
> 
> Hi,
> 
> I am attempting to compile ClamAV 0.99 on OS X, but I need a 32-bit library. I have downloaded and compiled OpenSSL for 32-bit, but am running into an issue that I am not sure how to resolve.
> 
> 
> Configuring and making with:
> 
> $ CFLAGS="-m32" ./configure --with-openssl=/Users/bperry/tmp/openssl-1.0.2e/ && make clean all
> 
> 
> However, during linking, compilation fails, and I cannot track down the cause. I have also exported CFLAGS to ensure all configure scripts getting run should be getting the -m32 flag. Is configure perhaps not passing on the correct architecture information to all sub-build scripts?
> 
>  CCLD   libclamav_internal_utils.la
>  CCLD   libclamav.la
> ld: warning: directory not found for option '-L/Users/bperry/tmp/openssl-1.0.2e//lib'
> ld: warning: ignoring file c++/.libs/libclamavcxx.a, file was built for archive which is not the architecture being linked (i386): c++/.libs/libclamavcxx.a
> ld: warning: ignoring file ../libclamav/libclamav.map, file was built for unsupported file format ( 0x43 0x4C 0x41 0x4D 0x41 0x56 0x5F 0x50 0x55 0x42 0x4C 0x49 0x43 0x20 0x7B 0x0A ) which is not the architecture being linked (i386): ../libclamav/libclamav.map
> Undefined symbols for architecture i386:
>  "_bytecode_init", referenced from:
>      _cl_init in libclamav_la-others.o
>     (maybe you meant: _cli_bytecode_init)
>  "_cli_bytecode_done_jit", referenced from:
>      _cli_bytecode_prepare2 in libclamav_la-bytecode.o
>      _selfcheck in libclamav_la-bytecode.o
>      _cli_bytecode_done in libclamav_la-bytecode.o
>  "_cli_bytecode_init_jit", referenced from:
>      _cli_bytecode_init in libclamav_la-bytecode.o
>  "_cli_bytecode_prepare_jit", referenced from:
>      _cli_bytecode_prepare2 in libclamav_la-bytecode.o
>      _selfcheck in libclamav_la-bytecode.o
>  "_cli_detect_env_jit", referenced from:
>      _cli_detect_environment in libclamav_la-bytecode_detect.o
>  "_cli_vm_execute_jit", referenced from:
>      _cli_bytecode_run in libclamav_la-bytecode.o
>  "_have_clamjit", referenced from:
>      _set_mode in libclamav_la-bytecode.o
>      _cli_detect_environment in libclamav_la-bytecode_detect.o
>      _set_mode in libclamav_la-bytecode.o
>      _cli_detect_environment in libclamav_la-bytecode_detect.o
> ld: symbol(s) not found for architecture i386
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
> make[4]: *** [libclamav.la] Error 1
> make[3]: *** [all-recursive] Error 1
> make[2]: *** [all] Error 2
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
> 
> 
> Any thoughts or suggestions? Any help is appreciated, thanks!

I realize now that I am an idiot and should have also been passing CXXFLAGS.

Whoops.

_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net

http://www.clamav.net/contact.html#ml
signature.asc (application/pgp-signature, 842 B)
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJWo6zaAAoJEKJq8VjVbt2pyDkQAI1z1jOOv3BR2N2q2exbklpM
QXvfhp36BpKNuhMTfgZAuA2k8kZ+WxgHbipUbXyJ4V4OxIyEx6pfXC5k1bS0vqP8
whu9rEAyDgc5F5KtPSsC0lYjFjbwUyhkIN4Pcr9cOzq5CwQBRXtUMJzUtUzxLFcq
jODEpQzNjcxH8phZf++LIHYW5Kwg69121yUKe6dHsBSZ1Dnd7DYv+WRT5i1ymw1H
MYVTc6PnR5MmdmlJaJQYRY9LLEvK6SRdRXEo+LbMde8SkVgqCBDHZza531S+wCP4
urqPM1f/JOVNnt8/0QIy0NtGY1U4Wp88e16DgFkCrhRKV4vfCFrhPFTmqquRp+yv
iu/yXv36iWkxCFlCwYrzHFiBtmaBYQwYBzRkPeRUwVhNsYEGUGxw24o64zgH4Sjv
VR6Ys1iIUxp1O1qwc5XPNf1ylTUAch1AqlulAHHntyzKDNn84i6x9j04z8iy0WFN
vpH7f+AOmcbdPXtMOEY9L/PxikQGdK2ceazcpEaF8LX5bsYpyTkp5fdV+ls4+u3i
y9nOQDBa6c13uX87+cJ/Kd/dn+Tdt9a22QCN2Vl0SfzUxTt8f1VwHniO/OiGpyOf
T3EsksgBS+tniiuV2cUBzG3lE9PFfrYJh08caNqm7dlYMa1idthUBADo2ftuZQ/u
fvEo2I5ejJWbxNs6rhYU
=1Nv+
-----END PGP SIGNATURE-----
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.