Opened 14 years ago

Closed 14 years ago

#25163 closed defect (fixed)

gmp clears build_arch

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 1.8.99
Keywords: Cc:
Port: gmp

Description

gmp clears build_arch:

# if CFLAGS and CXXFLAGS are undefined, configure script tries to build fastest library for build machine.
# On PowerPC machines, CFLAGS must be empty to get -force_cpusubtype_ALL.
pre-configure {
    # Set in pre-configure so any universal flags are removed as well.
    configure.build_arch
    configure.cflags
    configure.cxxflags
}

This causes hilarity for MacPorts 1.9.0 (rc2) when you try to install a dependent of gmp (like mpfr): MacPorts compares the architecture the dependent is about to be built for (e.g. x86_64) with the architecture recorded in the registry that gmp was built for (empty, thanks to the build_arch override in the gmp portfile), sees they don't match, and rebuilds gmp universal:

$ sudo port install gmp
--->  Computing dependencies for gmp
--->  Fetching gmp
--->  Verifying checksum(s) for gmp
--->  Extracting gmp
--->  Applying patches to gmp
--->  Configuring gmp
--->  Building gmp
--->  Staging gmp into destroot
--->  Installing gmp @5.0.1_0
--->  Activating gmp @5.0.1_0
--->  Cleaning gmp
$ sudo port install mpfr
--->  Computing dependencies for gmp
--->  Fetching gmp
--->  Verifying checksum(s) for gmp
--->  Extracting gmp
--->  Applying patches to gmp
--->  Configuring gmp
--->  Configuring gmp for architecture x86_64
--->  Configuring gmp for architecture i386
--->  Building gmp
--->  Building gmp for architecture x86_64
--->  Building gmp for architecture i386
--->  Staging gmp into destroot
--->  Staging gmp into destroot for architecture x86_64
--->  Staging gmp into destroot for architecture i386
--->  Computing dependencies for gmp
--->  Installing gmp @5.0.1_0+universal
--->  Deactivating gmp @5.0.1_0
--->  Cleaning gmp
--->  Activating gmp @5.0.1_0+universal
--->  Cleaning gmp
--->  Computing dependencies for mpfr
--->  Fetching mpfr
--->  Verifying checksum(s) for mpfr
--->  Extracting mpfr
--->  Applying patches to mpfr
--->  Configuring mpfr
--->  Building mpfr
--->  Staging mpfr into destroot
--->  Installing mpfr @2.4.2-p1_0
--->  Activating mpfr @2.4.2-p1_0
--->  Cleaning mpfr

So... don't set build_arch to empty, please; set it to the architecture that the software will be built for (or let MacPorts do so for you).

Change History (1)

comment:1 Changed 14 years ago by jmroot (Joshua Root)

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