Opened 10 years ago

Closed 10 years ago

#43635 closed defect (wontfix)

clamav 0.98.3_0 fails in build stage (missing symbols) with pre-Xcode 5.1

Reported by: zzanderr Owned by: danielluke (Daniel J. Luke)
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: danielluke (Daniel J. Luke)
Port: clamav

Description (last modified by ryandesign (Ryan Carsten Schmidt))

In main.log, I have numerous innocuous warnings, at least as far as I could tell, then :

:info:build ld warning: in ../libclamav/libclamav.map, file is not of required architecture

A few lines later, I get

:info:build ld: symbol(s) not found
:info:build collect2: ld returned 1 exit status
:info:build make[4]: *** [libclamav.la] Error 1

Note that the Changelog for clamav 0.98.3 states that the release is intended to "address Windows-specific issues." I'm by no means an expert, but perhaps this release wasn't meant for Macs that lack a windows boot partition.

Machine: ppc 7450 (PowerBook G4, 1.67 GHz)
OS: 10.5.8
XCode: 3.1.4 (latest version for Leopard)
Compiler: Xcode GCC 4.2
Port: clamav@0.98.3_0 (upgrade) (no clamav_milter nor universal variants selected in original install)
main.log attached

Attachments (2)

main.log (118.9 KB) - added by zzanderr 10 years ago.
clamav 0.98.3_0 main.log
main.2.log (716.7 KB) - added by zzanderr 10 years ago.

Download all attachments as: .zip

Change History (16)

Changed 10 years ago by zzanderr

Attachment: main.log added

clamav 0.98.3_0 main.log

comment:1 Changed 10 years ago by danielluke (Daniel J. Luke)

That's just a warning, but the problem seems to be similar to what happens on snow leopard, lion, mountain lion, and mavericks with Xcode 5.0 (but does not happen with Xcode 5.1 on mavericks):

  CCLD   libclamav.la
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 (x86_64): ../libclamav/libclamav.map
Undefined symbols for architecture x86_64:
  "_libiconv", referenced from:
      _encoding_normalize_toascii in libclamav_la-entconv.o
  "_libiconv_close", referenced from:
      _encoding_normalize_toascii in libclamav_la-entconv.o
      _iconv_pool_tls_instance_destroy in libclamav_la-entconv.o
  "_libiconv_open", referenced from:
      _encoding_normalize_toascii in libclamav_la-entconv.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Your problem appears to be a different set of symbols (but is otherwise similar).

I'm not sure what the problem is (yet).

If you figure it out before I do, please update this ticket.

comment:2 Changed 10 years ago by danielluke (Daniel J. Luke)

Owner: changed from macports-tickets@… to dluke@…
Port: clamav added
Status: newassigned
Summary: clamav 0.98.3_0 fails in build stage during upgrade from 0.98.1_1 on Leopard (ppc)clamav 0.98.3_0 fails in build stage (missing symbols) with pre-Xcode 5.1

comment:3 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)

comment:4 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

This might be easier to diagnose (to see if maybe -arch flags are missing somewhere) if you disabled silent build rules.

comment:5 Changed 10 years ago by danielluke (Daniel J. Luke)

Yeah - I don't have easy access to a machine where I can reproduce this anymore, though.

Can someone who does add '--disable-silent-rules' to the configure args in the Portfile and attach the (hopefully more verbose) build log?

Otherwise, I probably need to spin up a VM with Xcode 5.0 and/or an older Mac OS X release to see if I can reproduce/fix it.

comment:6 in reply to:  5 Changed 10 years ago by danielluke (Daniel J. Luke)

Replying to dluke@…:

Yeah - I don't have easy access to a machine where I can reproduce this anymore, though.

Can someone who does add '--disable-silent-rules' to the configure args in the Portfile and attach the (hopefully more verbose) build log?

Otherwise, I probably need to spin up a VM with Xcode 5.0 and/or an older Mac OS X release to see if I can reproduce/fix it.

I've just committed a revision of the port (so it links with macports openssl) that includes that configure option - so please sync your ports tree (after 30 minutes or so), try to build again, and attach the failed build log (which will hopefully contain some more info on what is going on).

comment:7 Changed 10 years ago by danielluke (Daniel J. Luke)

So, it looks like r119875 (strangely) fixed the build on the other buildslaves - can you let me know if it still fails on Leopard/PPC (and attach a new build log if it fails)?

comment:8 Changed 10 years ago by zzanderr

You guys work quick!

I am attempting a build on Leopard ppc right now. Should take about an hour, and I'll post the main.log.

Changed 10 years ago by zzanderr

Attachment: main.2.log added

comment:9 in reply to:  7 Changed 10 years ago by zzanderr

Replying to dluke@…:

So, it looks like r119875 (strangely) fixed the build on the other buildslaves - can you let me know if it still fails on Leopard/PPC (and attach a new build log if it fails)?

Oops... build stage still fails on Leopard/PPC. I seem to have made it a bit further though. The new main.log should be posted above. The error is different:

:info:build /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -DCL_NOTHREADS -I. -I..  -I/opt/local/include
 -I.. -I../shared -I../libclamav  -I/opt/local/include -I/opt/local/include  -pipe -Os -ar
ch ppc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -MT freshclam.o -MD -MP -MF .deps/freshcl
am.Tpo -c -o freshclam.o freshclam.c
:info:build In file included from ../libclamav/matcher.h:28,:info:build                  from ../libclamav/others.h:21,:info:build                  from freshclam.c:57:
:info:build ../libclamav/others.h:154: error: expected specifier-qualifier-list before ‘st
ats_section_t’:info:build ../libclamav/others.h:323: error: expected specifier-qualifier-list before ‘clcb_stats_add_sample’
:info:build ../libclamav/others.h:380: error: expected specifier-qualifier-list before ‘cl
cb_stats_add_sample’:info:build freshclam.c: In function ‘submit_host_info’::info:build freshclam.c:766: error: ‘struct cl_engine’ has no member named ‘cb_stats_submi
t’:info:build freshclam.c:773: error: ‘struct cl_engine’ has no member named ‘cb_stats_submit’
:info:build freshclam.c:786: error: ‘CL_ENGINE_STATS_TIMEOUT’ undeclared (first use in thi
s function)
:info:build freshclam.c:786: error: (Each undeclared identifier is reported only once
:info:build freshclam.c:786: error: for each function it appears in.)
:info:build make[2]: *** [freshclam.o] Error 1
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macpo
rts_sources_rsync.macports.org_release_tarballs_ports_sysutils_clamav/clamav/work/clamav-0
.98.3/freshclam'
:info:build make[1]: *** [all-recursive] Error 1
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macpo
rts_sources_rsync.macports.org_release_tarballs_ports_sysutils_clamav/clamav/work/clamav-0
.98.3'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports
_sources_rsync.macports.org_release_tarballs_ports_sysutils_clamav/clamav/work/clamav-0.98.3'

I hope this helps.

Though I enjoy the challenges that Leopard poses 7 years after its release, occasionally I daydream about a brand-new MacBook Pro...

comment:10 Changed 10 years ago by zzanderr

Please let me know if you would like me to try building with certain options or using such and such; I would like to help if I can.

comment:11 Changed 10 years ago by danielluke (Daniel J. Luke)

some searching indicates that some FreeBSD users had the same problem that was solved by uninstalling the old clamav before trying to build the new one. Can you deactivate your current clamav install and try to build (you can reactivate it if the new build fails).

I recently retired my last running PPC machine (that had been running since ~2001).

comment:12 in reply to:  11 Changed 10 years ago by zzanderr

Replying to dluke@…:

some searching indicates that some FreeBSD users had the same problem that was solved by uninstalling the old clamav before trying to build the new one. Can you deactivate your current clamav install and try to build (you can reactivate it if the new build fails).

I recently retired my last running PPC machine (that had been running since ~2001).

Just deactivated clamav and I am currently building from scratch. Should be a little more than an hour before I have results...

comment:13 in reply to:  11 Changed 10 years ago by zzanderr

Replying to dluke@…:

some searching indicates that some FreeBSD users had the same problem that was solved by uninstalling the old clamav before trying to build the new one. Can you deactivate your current clamav install and try to build (you can reactivate it if the new build fails).

I recently retired my last running PPC machine (that had been running since ~2001).

It installed:

--->  Configuring clamav
--->  Building clamav
--->  Staging clamav into destroot
--->  Installing clamav @0.98.3_1
--->  Cleaning clamav
--->  Computing dependencies for clamav
--->  Activating clamav @0.98.3_1
--->  Cleaning clamav
--->  Updating database of binaries: 100.0%
--->  Scanning binaries for linking errors: 100.0%
--->  No broken files found.

I need to edit the config files before I will know that it works as advertised, but it looks OK.

Thanks for your help.

NOTE: the irony here is you guys are 10 times quicker than the support desk for an arbitrary retail software package.

comment:14 Changed 10 years ago by danielluke (Daniel J. Luke)

Resolution: wontfix
Status: assignedclosed

I'm glad it worked for you, I think that's probably an OK workaround for PPC machines, so unless someone out there develops a patch to fix the build another way I'll just close this ticket.

Note: See TracTickets for help on using tickets.