Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#40947 closed defect (worksforme)

clamav 0.98 build fails under Mavericks

Reported by: disposable@… Owned by: danielluke (Daniel J. Luke)
Priority: Normal Milestone:
Component: ports Version: 2.2.0
Keywords: Cc:
Port: clamav

Description

Trying to build clamav 0.98 (or the universal variant) fails on one my 10.9 computers with the error related to incorrect architecture of libraries with the error (I've added an ellipsis for brevity):

:info:build --->  Building clamav for architecture x86_64
:debug:build Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_clamav/clamav/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.9'
:debug:build Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_clamav/clamav/work/clamav-0.98-x86_64" && /usr/bin/make -j4 -w all'
:debug:build Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_clamav/clamav/work/clamav-0.98-x86_64" && /usr/bin/make -j4 -w all
...
:info:build ld: warning: directory not found for option '-L/Users/gkhanna/build/x86_64-apple-darwin11.0.0/libstdc++-v3/src'
:info:build ld: warning: directory not found for option '-L/Users/gkhanna/build/x86_64-apple-darwin11.0.0/libstdc++-v3/src/.libs'
:info:build 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
:info:build Undefined symbols for architecture x86_64:
:info:build   "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::at(unsigned long) const", referenced from:
:info:build       llvm::UpgradeIntrinsicFunction(llvm::Function*, llvm::Function*&) in libclamavcxx.a(AutoUpgrade.o)
:info:build       llvm::UpgradeIntrinsicCall(llvm::CallInst*, llvm::Function*) in libclamavcxx.a(AutoUpgrade.o)
:info:build       ExtendNEONArgs(llvm::CallInst*, llvm::Value*, llvm::Value*, llvm::Value*&, llvm::Value*&) in libclamavcxx.a(AutoUpgrade.o)
:info:build       CallVABD(llvm::CallInst*, llvm::Value*, llvm::Value*) in libclamavcxx.a(AutoUpgrade.o)

I have followed the migration guide. Including reinstalling MacPorts and ports a second time, just in case, and my macports.conf file does not differ from macports.conf.default.

Attachments (1)

main.log (356.1 KB) - added by disposable@… 10 years ago.
Updated Log of Failed Build

Download all attachments as: .zip

Change History (19)

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

Owner: changed from macports-tickets@… to dluke@…
Status: newassigned

comment:2 Changed 10 years ago by disposable@…

To be clear, the parts of macports.conf I checked for being the same with macports.conf.default are "build_arch" and "universal_archs" only.

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

was it perhaps not a clean build attempt? (ie. did you try 'sudo port clean clamav && sudo port install clamav') ?

It would probably be helpful if you could attach a complete build log. I just did a successful +universal build of clamav on my 10.9 box.

comment:4 Changed 10 years ago by disposable@…

I believe it was, but just in case tried again to no avail. I reverted to non "+universal" after "+universal" failed, so I will re-clean and retry with that variant now. Mysteriously builds on my other Mac as well, but I can't seem to find a difference between the two environments.

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

You've made sure that you installed the command line tools on the box that's failing (xcode-select --install)?

I'm doing a build on my local box again so I can diff it with your failed main.log

comment:6 Changed 10 years ago by disposable@…

I've run xcode-select --install. I'm not sure how to test it installed correctly in a definitive sense, but running cc --version gives me

Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix

Thanks for looking into this!

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

A couple of things I noticed:

You have some dependencies that aren't build universal (libiconv, zlib, bzip2, ncurses).

Your configure run also has some differences that I'll need to look at the configure script to explain (yours are - in the diff, mine are +):

-checking for BSD- or MS-compatible name lister (nm)... /opt/local/bin/nm
-checking the name lister (/opt/local/bin/nm) interface... BSD nm
+checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
+checking the name lister (/usr/bin/nm) interface... BSD nm

...

-checking command to parse /opt/local/bin/nm output from /usr/bin/clang object... ok
+checking command to parse /usr/bin/nm output from /usr/bin/clang object... ok

...

-checking dependency style of /usr/bin/clang++... gcc3
+checking dependency style of /usr/bin/clang++... none

... 

-checking dependency style of /usr/bin/clang... gcc3
+checking dependency style of /usr/bin/clang... none

...

-checking for BSD-compatible nm... /opt/local/bin/nm
+checking for BSD-compatible nm... /usr/bin/nm

...

-checking for as... /opt/local/bin/as
-checking for linker version... 136
+checking for as... /usr/bin/as
+checking for linker version... 224.1

...

-checking command to parse /opt/local/bin/nm output from  object... ok
+checking command to parse /usr/bin/nm output from  object... ok

Can you tell me what port provides /opt/local/bin/nm and port provides /opt/local/bin/as say?

I'm mostly suspicious of that.

Last edited 10 years ago by danielluke (Daniel J. Luke) (previous) (diff)

comment:8 Changed 10 years ago by disposable@…

Unfortunately, I'm not sure which port provides those binaries. My requested ports are:

ffmpeg gcc48 gcc49 gnuplot grace lame most subversion texlive +full vim

where I believe gcc48 or gcc49 and their dependencies are the most likely culprit.

But I don't know how to check. Is there someplace I can look inside Portfiles or perhaps elsewhere to hunt down which port installed a given binary?

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

run port provides /opt/local/bin/nm and port provides /opt/local/bin/as

port will tell you if the file(s) belong to a port.

comment:10 Changed 10 years ago by disposable@…

Ah ha, thanks! Both files are provided by the port cctools.

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

Can you try deactivating cctools and see if it lets clamav build?

comment:12 Changed 10 years ago by disposable@…

Deactivated cctools, but still doesn't build unfortunately. It fails with what seems to be the same error. Checked the log, and the difference in configuration is now only

-checking dependency style of /usr/bin/clang++... gcc3
+checking dependency style of /usr/bin/clang++... none

... 

-checking dependency style of /usr/bin/clang... gcc3
+checking dependency style of /usr/bin/clang... none

comment:13 Changed 10 years ago by disposable@…

Tried deactivating all ports, then installing clamav. Build failed with dependency style of /usr/bin/clang and /usr/bin/clang++ as gcc3.

comment:14 Changed 10 years ago by disposable@…

Tried uninstalling all ports, then installing clamav. Build failed again with the same errors.

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

Resolution: worksforme
Status: assignedclosed

I'm at somewhat of a loss, since it builds fine on 10.9 for me (and for you on your other machines). There must be something specific to that machine that is causing the issue, but I don't know what it is. Please post here if you figure it out.

comment:16 Changed 10 years ago by disposable@…

OK, I haven't figured it out, but got one step closer. I was forgetting to use the universal variant, and switching to that caused the dependency style to match (listed as none instead of gcc3). However, I believe I missed one persistent difference from before. For some reason, I get

checking for as... /usr/bin/as

but I still have

checking for linker version... 136

I re-downloaded the command line tools from the developer website and re-installed (using xcode-select would give me a weird 'not available' style error), but the linker version remains the same.

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

My suspicion is that if you get xcode-select --install to work, your build will succeed.

Changed 10 years ago by disposable@…

Attachment: main.log added

Updated Log of Failed Build

comment:18 Changed 10 years ago by disposable@…

The earlier discrepancies seem to be resolved now, with all the listed items matching yours. It still fails to build unfortunately. If you could when opportunity arises, please see if there are other discrepancies that might account for the failure to build. I've attached a new log with the current output for the failed build.

Note: See TracTickets for help on using tickets.