Opened 4 years ago

Closed 6 months ago

Last modified 5 months ago

#60881 closed defect (fixed)

Portindex: "Failed to locate 'gnumake' in path" when faking the platform on Linux

Reported by: arjunsalyan (Arjun Salyan) Owned by: jmroot (Joshua Root)
Priority: Normal Milestone: MacPorts 2.9.0
Component: base Version: 2.6.2
Keywords: Cc:
Port:

Description

Portindex fails to parse around 32 ports on Linux, with the following error:

Failed to parse file devel/xxdiff/Portfile: can't read "build.cmd": Failed to locate 'gnumake' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its MacPort
s configuration time location, did you move it?

I was trying to fake the platform,

portindex -p macosx_19_i386

"gnumake" is probably not available on Linux. I am not sure but there should be some backup in case "gnumake" is not found. Creating a symlink "/usr/bin/gnumake" with "/usr/bin/make" fixes the error. Can this be handled automatically by MacPorts?

Change History (8)

comment:1 Changed 4 years ago by kencu (Ken)

probably xxdiff just needs cleanup. This seems unnecessary:

# from README.build: "You will need GNU make."
build.type              gnu

as AFAIK all our make and gmake binaries are "gnumake".

comment:2 Changed 4 years ago by kencu (Ken)

builds fine for me on 10.6.8 with those lines deleted (with 100,000 warnings thanks to clang-9.0...)

comment:3 Changed 4 years ago by kencu (Ken)

but doesn't actually run, it turns out, due to

$ open /Applications/MacPorts/xxdiff.app
LSOpenURLsWithRole() failed with error -10810 for the file /Applications/MacPorts/xxdiff.app.

which is, no doubt, a Separate Issue.

comment:4 in reply to:  1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

I don't remember when Mac OS X switched from BSD make to GNU make as default, or if it was always GNU by default. I think even Tiger's make is GNU make, and that's as old as we care about in MacPorts.

Still, I don't think it should be considered an error for ports to use build.type gnu nor do I think the fix should be to remove that from the ports that use it. That's a documented option that's supposed to ensure GNU make is used. If that option isn't working on Linux, why not fix it so that it does?

Last edited 4 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

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

There's already some code in portbuild::build_getmaketype in browser:macports-base/src/port1.0/portbuild.tcl for dealing with Linux.

But I see now that you said the problem only happened when you told MacPorts to fake the macosx platform when running on Linux. So that's a little different. I'm not sure exactly where a fix would be needed for that.

comment:6 Changed 6 months ago by jmroot (Joshua Root)

Owner: set to jmroot
Resolution: fixed
Status: newclosed

In 1b4e6a113d58d164c6d0f07cafb787530e554e77/macports-base (master):

Never error out in build_getmaketype

This could prevent parsing of ports that read the value of build.cmd
outside of any phase. Instead, return an empty string when the command
isn't found, and only error out if it's empty when it's about to
actually be run.

Closes: #60881

comment:7 Changed 6 months ago by jmroot (Joshua Root)

Milestone: MacPorts Future

comment:8 Changed 5 months ago by jmroot (Joshua Root)

Milestone: MacPorts FutureMacPorts 2.9.0
Note: See TracTickets for help on using tickets.