[MacPorts] #43751: masscan is not UsingTheRightCompiler nor -arch flags nor does it have a universal variant

MacPorts noreply at macports.org
Mon May 19 16:26:17 PDT 2014


#43751: masscan is not UsingTheRightCompiler nor -arch flags nor does it have a
universal variant
---------------------------+-----------------------
  Reporter:  ryandesign@…  |      Owner:  jul_bsd@…
      Type:  defect        |     Status:  new
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.3.99
Resolution:                |   Keywords:
      Port:  masscan       |
---------------------------+-----------------------

Comment (by ryandesign@…):

 Replying to [comment:1 jul_bsd@…]:
 > Could you document what is needed for universal variant as I can't test
 it. Ony doc I see
 >
 >
 https://guide.macports.org/chunked/reference.phases.html#reference.phases.configure.universal
 [[br]]
 > wiki:howto/buildUniversal [[br]]
 > just add a variant w -arch i386 -arch x86_64 ?
 configure.universal_cflags? nothing for m32/m64?

 I can't really document it because it varies for each port; each build
 system is different. MacPorts automatically handles standard build systems
 like autoconf (default), cmake (using the cmake portgroup) and xcode
 (xcode portgroup). But because masscan uses a handmade Makefile, it's up
 to you to figure out where exactly the `-arch` flags need to be specified,
 and how best to insert them. Note that you need to use `-arch` flags for
 all builds, not just universal ones. Use the `[get_canonical_archflags]`
 procedure to get them. Define an empty universal variant before the first
 line where you invoke this procedure. You can see an example of this
 pattern in the ascii port, and a slightly different way of doing it in the
 dcraw port. The method used in dcraw (including the `-arch` flags in CC)
 works well for build systems that don't give you easily-modifiable
 variables; masscan gives you FLAGS2, but if you also need to munge LIBS,
 then using CC instead might be simpler. But see if it works without
 munging LIBS, since LIBS is supposed to be for libraries that are linked
 with, not other flags.

 > do every port need to have an universal variant?

 That would be ideal. Every port that compiles software, that is. Some
 ports just install text files (and specify "supported_archs noarch"), so
 universal isn't applicable to those.

 > How masscan is not using right compiler? arg, just hardcoded CC=gcc,
 switch to ${configure.cc}

 Yes, that's the problem. Consider setting CC in build.args instead of
 using reinplaces; again, see ascii and dcraw for examples.

 > patch proposal joined.  but +universal failed to build on
 > {{{
 > ld: warning: ignoring file /opt/local/lib/libpcap.dylib, file was built
 for x86_64 which is not the architecture being linked (i386):
 /opt/local/lib/libpcap.dylib
 > }}}
 > it seems libpcap is not universal ...

 MacPorts automatically ensures dependencies are built universal if you
 build a port universal. However masscan does not declare any dependencies.
 So you've just proved that masscan needs a library dependency on libpcap.

-- 
Ticket URL: <https://trac.macports.org/ticket/43751#comment:2>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list