Opened 6 years ago

Closed 6 years ago

#43123 closed defect (fixed)

p5.12-mail-clamav: error: unknown argument: '-R/opt/local/lib'

Reported by: hbsimon (Horst Simon) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: ryandesign (Ryan Schmidt), cooljeanius (Eric Gallager)
Port: p5-mail-clamav

Description (last modified by ryandesign (Ryan Schmidt))

The latest command line tools include a newer version of clang that’s stricter about unused arguments. Where before it was only a warning, now it is an error. pre-req p5.12-mail-clamav build for amavisd-new fails with clang error unknown option

:info:build clang: error: unknown argument: '-R/opt/local/lib' [-Wunused-command-line-argument-hard-error-in-future]
:info:build clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

I am using OS/X Maverick 10.9.2 witch latest Xcode and command line tools from March 2014.

Attachments (3)

main.log (16.9 KB) - added by hbsimon (Horst Simon) 6 years ago.
main_22-04-2014.log (21.1 KB) - added by hbsimon (Horst Simon) 6 years ago.
main_23_04.log (29.9 KB) - added by hbsimon (Horst Simon) 6 years ago.

Download all attachments as: .zip

Change History (20)

Changed 6 years ago by hbsimon (Horst Simon)

Attachment: main.log added

comment:1 Changed 6 years ago by ryandesign (Ryan Schmidt)

Description: modified (diff)

comment:2 Changed 6 years ago by ryandesign (Ryan Schmidt)

Summary: Install amavisd-new fails to build pre-req p5.12-mail-clamavp5.12-mail-clamav: error: unknown argument: '-R/opt/local/lib'

We've seen a lot of this sort of error with the March 2014 command line tools; its clang is apparently stricter than old versions used to be.

comment:3 Changed 6 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to dluke@…
Port: clamav p5-mail-clamav added; p5.12-mail-clamav removed

The flag comes from clamav-config.

comment:4 Changed 6 years ago by danielluke (Daniel J. Luke)

Looks like clamav doesn't build on 10.9 now as well:

In file included from llvm/lib/Analysis/LoopInfo.cpp:17:
./llvm/include/llvm/Analysis/LoopInfo.h:817:19: error: no matching member function for call to 'insert'
        TodoStack.insert(TodoStack.end(), InvBlockTraits::child_begin(X),
        ~~~~~~~~~~^~~~~~
./llvm/include/llvm/Analysis/LoopInfo.h:755:22: note: in instantiation of member function 'llvm::LoopInfoBase<llvm::BasicBlock, llvm::Loop>::ConsiderForLoop' requested here
      if (LoopT *L = ConsiderForLoop(*NI, DT))
                     ^
llvm/lib/Analysis/LoopInfo.cpp:384:6: note: in instantiation of member function 'llvm::LoopInfoBase<llvm::BasicBlock, llvm::Loop>::Calculate' requested here
  LI.Calculate(getAnalysis<DominatorTree>().getBase());    // Update
     ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/vector:718:14: note: candidate function not viable: no known conversion from 'ChildIteratorType' (aka 'PredIterator<llvm::BasicBlock, Value::use_iterator>') to 'size_type' (aka 'unsigned long') for 2nd argument
    iterator insert(const_iterator __position, size_type __n, const_reference __x);
             ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/vector:722:14: note: candidate template ignored: disabled by 'enable_if' [with _InputIterator = llvm::PredIterator<llvm::BasicBlock, llvm::value_use_iterator<llvm::User> >]
             __is_input_iterator  <_InputIterator>::value &&
             ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/vector:733:13: note: candidate template ignored: disabled by 'enable_if' [with _ForwardIterator = llvm::PredIterator<llvm::BasicBlock, llvm::value_use_iterator<llvm::User> >]
            __is_forward_iterator<_ForwardIterator>::value &&
            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/vector:710:14: note: candidate function not viable: requires 2 arguments, but 3 were provided
    iterator insert(const_iterator __position, const_reference __x);
             ^
1 warning and 1 error generated.

comment:5 Changed 6 years ago by hbsimon (Horst Simon)

Can this option -R be removed, since it is obsolete.

comment:6 Changed 6 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:7 Changed 6 years ago by hbsimon (Horst Simon)

The only clamav-config I found was in /opt/local/bin and under --libs was the -R/opt/local/lib option, which I removed, but this did not solve the build error. Is there any other way to get this build, I need to have amavisd-new.

comment:8 Changed 6 years ago by danielluke (Daniel J. Luke)

Upstream clamav build bug: https://bugzilla.clamav.net/show_bug.cgi?id=10757

The patch there seems to work, I'm doing some additional testing now and will commit an updated clamav port shortly.

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

clamav build fixed in r119246

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

Owner: changed from dluke@… to macports-tickets@…
Port: clamav removed

Changed 6 years ago by hbsimon (Horst Simon)

Attachment: main_22-04-2014.log added

comment:11 Changed 6 years ago by hbsimon (Horst Simon)

Hi,

I am still failing with the -R option, do I have to run some commands to remove the previous failed build before I can install it again? I am too have attached the latest main.log file

comment:12 Changed 6 years ago by hbsimon (Horst Simon)

One more update I run sudo port clean p5-mail-clamav before I tried it.

comment:13 in reply to:  12 Changed 6 years ago by jmroot (Joshua Root)

Replying to horst.simon@…:

One more update I run sudo port clean p5-mail-clamav before I tried it.

You need to clean p5.12-mail-clamav since that is the port that is failing to build.

Changed 6 years ago by hbsimon (Horst Simon)

Attachment: main_23_04.log added

comment:14 Changed 6 years ago by hbsimon (Horst Simon)

I run following, but still get the error:

jupiter:~ horst$ sudo port clean p5.12-mail-clamav
Password:
--->  Cleaning p5.12-mail-clamav
jupiter:~ horst$ sudo port install p5.12-mail-clamav
--->  Computing dependencies for p5.12-mail-clamav
--->  Fetching archive for p5.12-mail-clamav
--->  Attempting to fetch p5.12-mail-clamav-0.290.0_3.darwin_13.x86_64.tbz2 from http://jog.id.packages.macports.org/macports/packages/p5.12-mail-clamav
--->  Attempting to fetch p5.12-mail-clamav-0.290.0_3.darwin_13.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/p5.12-mail-clamav
--->  Attempting to fetch p5.12-mail-clamav-0.290.0_3.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/p5.12-mail-clamav
--->  Fetching distfiles for p5.12-mail-clamav
--->  Verifying checksums for p5.12-mail-clamav
--->  Extracting p5.12-mail-clamav
--->  Applying patches to p5.12-mail-clamav
--->  Configuring p5.12-mail-clamav
--->  Building p5.12-mail-clamav
Error: org.macports.build for port p5.12-mail-clamav returned: command execution failed
Please see the log file for port p5.12-mail-clamav for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_perl_p5-mail-clamav/p5.12-mail-clamav/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port p5.12-mail-clamav failed
Last edited 6 years ago by ryandesign (Ryan Schmidt) (previous) (diff)

comment:15 Changed 6 years ago by ryandesign (Ryan Schmidt)

Please remember to use WikiFormatting.

Have you already run the following?

sudo port selfupdate
sudo port upgrade outdated

comment:16 Changed 6 years ago by hbsimon (Horst Simon)

Thanks, this did it, it installed ok and too amavisd-new installed. Thanks again

comment:17 Changed 6 years ago by ryandesign (Ryan Schmidt)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.