Opened 5 years ago

Last modified 3 years ago

#59627 new defect

yara @3.11.0: error: too many arguments to function call, expected 2, have 3

Reported by: sierkb (Sierk Bornemann) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc: reneeotten (Renee Otten), ryandesign (Ryan Carsten Schmidt)
Port: yara

Description (last modified by mf2k (Frank Schima))

Error: Failed to build yara: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_security_yara/yara/main.log for details.

For further details, full log file is attached.

Attachments (1)

main.log (57.5 KB) - added by sierkb (Sierk Bornemann) 5 years ago.
yara main.log

Download all attachments as: .zip

Change History (16)

Changed 5 years ago by sierkb (Sierk Bornemann)

Attachment: main.log added

yara main.log

comment:1 Changed 5 years ago by mf2k (Frank Schima)

In the future, please use WikiFormatting.

comment:2 Changed 5 years ago by mf2k (Frank Schima)

Description: modified (diff)

comment:3 Changed 5 years ago by mf2k (Frank Schima)

Error appears to be:

:info:build In file included from modules/pe.c:52:
:info:build /opt/local/include/yara/strutils.h:38:10: fatal error: 'config.h' file not found
:info:build #include "config.h"
:info:build          ^~~~~~~~~~
:info:build 1 error generated.

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

Cc: reneeotten added

Renee, you just updated this port and it presumably built for you... could you take a look?

comment:5 Changed 5 years ago by reneeotten (Renee Otten)

It indeed builds for me locally and also on the buildbots all the way down to 10.7. The only thing I noticed is that the macOS 10.13 buildbot has Xcode 9.4.1, whereas @sierkb has Xcode 10.1 - unfortunately I don't know whether there is something here that would make an obvious difference.

@sierkb did you do a new installation or an upgraded from a previous version? I suspect the latter and looking at the Portfile now again I realize there is the following statement that I initially missed:

# If previous yara is installed, this build will fail since
# /opt/local/include is before ./libyara/include
# so swap CPPFLAGS and CFLAGS
# Remove this upon the next release after verifying it is not needed.

So it's possible that upstream has corrected it in this newer versions and we (read: I) am effectively causing the problem now again. On the other hand, I just installed the previous version and did an upgrade myself, which worked perfectly fine. @sierkb, if you want you can try to remove the post-configure phase and see if that helps.

I don't think I can be of more help at the moment - sorry...

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

Cc: ryandesign added
Summary: yara@3.11.0: build failedyara @3.11.0: error: too many arguments to function call, expected 2, have 3

You're probably right, Renee.

We need to be looking at the first error in the log, which is:

:info:build modules/tests.c:91:11: error: too many arguments to function call, expected 2, have 3
:info:build           string_argument(2)));
:info:build           ^~~~~~~~~~~~~~~~~~~~
:info:build /opt/local/include/yara/modules.h:278:5: note: expanded from macro 'string_argument'
:info:build     (sized_string_argument(n)->c_string)
:info:build     ^

So indeed, the build is including the modules.h header from the already-installed version of yara, with which it is incompatible, instead of the one from the version we're currently building.

I'm looking into it, and I see at least 2 problems already: configure.ac is hardcoded to look in /opt/local and /usr/local/opt/openssl; we'll want to patch out both of those. I'm testing if that change is enough to fix this problem.

comment:7 in reply to:  5 ; Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to reneeotten:

It indeed builds for me locally and also on the buildbots all the way down to 10.7.

Builds have not yet completed on 10.8 and earlier. The port health indicators are misleading.

comment:8 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Ok, I do have a patch that gets the -I flags into the right order, without that post-configure block. But now I'm getting a link error. I'll have to take a break and come back to this later.

comment:9 in reply to:  7 ; Changed 5 years ago by reneeotten (Renee Otten)

Replying to ryandesign:

Replying to reneeotten:

It indeed builds for me locally and also on the buildbots all the way down to 10.7.

Builds have not yet completed on 10.8 and earlier. The port health indicators are misleading.

Aha, I see now - probably have relied on the nice green colors too much than lately... On a related note, it used to be that the buildbot would send an e-mail when a build failed, has that changes as I don't get any of those anymore?

comment:10 in reply to:  5 ; Changed 5 years ago by sierkb (Sierk Bornemann)

Replying to reneeotten:

It indeed builds for me locally and also on the buildbots all the way down to 10.7. The only thing I noticed is that the macOS 10.13 buildbot has Xcode 9.4.1, whereas @sierkb has Xcode 10.1 - unfortunately I don't know whether there is something here that would make an obvious difference.

@sierkb did you do a new installation or an upgraded from a previous version? I suspect the latter…

Rather the latter: System and MacPorts installation unchanged – I've just done a

$ sudo port selfupdate; sudo port -u upgrade outdated

as I do regulary.

System: 10.13.6 (High Sierra), Xcode Version 10.1 (the most recent available one, Apple provides for a High Sierra system – I gladly would use a newer one, if Apple just would provide one) together with the corresponding Xcode Command Line Tools installed.

comment:11 in reply to:  9 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to reneeotten:

it used to be that the buildbot would send an e-mail when a build failed, has that changes as I don't get any of those anymore?

I don't either. See #56045. It's my server so I need to look into it, but I haven't cared to do so because there are so many other things to do and I didn't find the format that the emails are currently in to be very useful anyway.

comment:12 in reply to:  10 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to sierkb:

Replying to reneeotten:

@sierkb did you do a new installation or an upgraded from a previous version? I suspect the latter…

Rather the latter:

While we work out the real fix, you can work around the problem by deactivating the old version of the port first:

sudo port -f deactivate yara && sudo port -u upgrade yara

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

Has duplicate #61059.

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

In d48f12bbb091700c1955d3f8e89d45e0f28b5e01/macports-ports (master):

yara: Use patchfile to remove Homebrew paths

Also remove hardcoded /opt/local path.

See: #59627

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

In c67377e3df0f802af1bc0df335421ce89e395735/macports-ports (master):

yara: Fix order of -I flags

See: #59627

Order of -L flags is still wrong.

Note: See TracTickets for help on using tickets.