Compiling with -m32 on OS X

Brandon Perry <[email protected]>
Newsgroups gmane.comp.security.virus.clamav.devel
Message-ID <[email protected]>
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!

_______________________________________________
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

iQIcBAEBCgAGBQJWo6wzAAoJEKJq8VjVbt2p8xYP/03mpzjmEwhPc6fF8lCt1jew
sBeplYZt5/vODIvTcSR854GkBhCBxv5CqaQt4P8fYcdy827oKMe0vZQ6JyTzrVb3
6cHZmE6wYKpGq7Hc7vNpDqoylf6LPmGygbBGnm+eZlrYcnKhLL/3W3SZqKyvdKDc
ROcS/kVMGusU6NmcR/WIh+gsBZHdxTXKpd30i+Tnz5RjObbZJ+SaOOvPW+iyHP3e
ueA9lBv0+qejZ1CfRRNTDlyas4o7a19sriO3IBSrTKIyIeZef/wSWWK0lRHLwnuB
qekKO7wJcT4UTdBOiNCl7IjJH8+2gTR9ikeEwFC9Y0Wb0pMaaPCCYOqpgAJxSUNd
9amms7sMnXwvnwjEdC0XnT7NSnYcMtI96hNJ8yN1z5XmkdUt3YUmdks6VTCjnk2R
jfIrNN1CA3EAXsq1HrL7z8uAkP1n1YND1lx6o1VIY+1aIqLXDmVhKJyoc8jI3coC
Nj9L6Q6l7TRYEtPP1EMmcahJ+85gWWk+iMzGza2aow9CmIl/0YNrcuSmxs3pgZm/
Ii+iS3IPNimtAdv+cFxlkUpvkYwtNfOMxKeTKvn6Fnypgeiwrrj/umjErOpdSFc+
4/kMM53alBSSobMMpBLtkz5snesZqn6lumCq5BS0nhbyaX+I+E7PgwPgwmTcXCaq
wGNPtWpJLKBoYsnnm28k
=27XE
-----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.