Opened 23 months ago

Closed 23 months ago

Last modified 23 months ago

#66618 closed defect (fixed)

grep fails to build as a universal2 build during the config stage

Reported by: MichaelGDev48 (Michael G) Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version: 2.8.99
Keywords: Cc:
Port: grep

Description

when installing with the universal2 flag it fails to configure log will be attached below

Attachments (1)

config.log (2.0 MB) - added by MichaelGDev48 (Michael G) 23 months ago.
configure log

Download all attachments as: .zip

Change History (8)

Changed 23 months ago by MichaelGDev48 (Michael G)

Attachment: config.log added

configure log

comment:1 Changed 23 months ago by jmroot (Joshua Root)

Owner: set to Schamschula
Status: newassigned

comment:2 Changed 23 months ago by Schamschula (Marius Schamschula)

I'm no expert on on universal builds (I personally avoid them). PRs welcome!

comment:3 Changed 23 months ago by kencu (Ken)

There is something about building universal in "one pass" as arm64/x86_64 that causes certain tests to fail, like this one:

checking for socklen_t... no
checking for socklen_t equivalent... configure: error: Cannot find a type to use in place of socklen_t

I haven't looked closely enough to see why this won't work when building with multiple arches, but it often fails.

Using the muniversal 1.1 PG gets past it though:

% port -v installed grep
The following ports are currently installed:
  grep @3.8_1+universal (active) requested_variants='+universal' platform='darwin 22' archs='arm64 x86_64' date='2023-01-04T11:44:40-0800'

I presume this builds universal on same-arch systems (x86_64/i386) as is, so adding muniversal 1.1 might be only done for newer systems... but that sounds like too much trouble to me, so perhaps just add it always, I would think.

Last edited 23 months ago by kencu (Ken) (previous) (diff)

comment:5 Changed 23 months ago by kencu (Ken)

Resolution: fixed
Status: assignedclosed

In 97cf17c350a02266e5a52316c808088d6a1126ff/macports-ports (master):

grep: fix universal builds

when building across architectures, configure
fails due to divergent definitions of socklen_t

so use muniversal to get past this, pending a more robust fix

closes: #66618

comment:6 Changed 23 months ago by MichaelGDev48 (Michael G)

Hmm i did sudo port selfupdate and sudo port clean grep and im still getting an error should i attach the logs? edit: Hmm still seems to be a problem with socklen_t

Last edited 23 months ago by MichaelGDev48 (Michael G) (previous) (diff)

comment:7 Changed 23 months ago by kencu (Ken)

It takes a bit to get the changes to your system.

if you do something like this:

cat `port file grep` | grep muniversal

you can see if you have the fix as yet. It looks like this:

% cat `port file grep` | grep muniversal
PortGroup       muniversal 1.1
Note: See TracTickets for help on using tickets.