Opened 8 years ago

Closed 7 years ago

#50885 closed defect (fixed)

`port -b` or `buildfromsource never` do not prevent local compilation if Portfile clears archive_sites

Reported by: burner1024 (Ilya Ivanov) Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 2.4.0
Component: base Version: 2.3.4
Keywords: Cc:
Port:

Description

Both "-b" option and "buildfromsource never" don't work for me.

OSX 10.10.5

Fresh MacPorts installation (from .pkg)

# port version
Version: 2.3.4
# grep buildfromsource /opt/local/etc/macports/macports.conf
buildfromsource     	never
# port installed
No ports are installed.
# port -b -v install gmp
--->  Fetching distfiles for gmp
--->  gmp-6.1.0.tar.bz2 doesn't seem to exist in /opt/local/var/macports/distfiles/gmp
--->  Attempting to fetch gmp-6.1.0.tar.bz2 from http://jog.id.distfiles.macports.org/macports/mpdistfiles/gmp
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0--->  Attempting to fetch gmp-6.1.0.tar.bz2 from http://cjj.kr.distfiles.macports.org/gmp
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 2327k  100 2327k    0     0   320k      0  0:00:07  0:00:07 --:--:--  480k
--->  Verifying checksums for gmp
--->  Checksumming gmp-6.1.0.tar.bz2
--->  Extracting gmp
--->  Extracting gmp-6.1.0.tar.bz2
--->  Applying patches to gmp
--->  Applying patch-Makefile.in.diff
patching file Makefile.in
--->  Patching gmp-h.in: s|"@CC@"|"/usr/bin/clang"|g
--->  Configuring gmp
checking build system type... ivybridge-apple-darwin14.5.0
checking host system type... ivybridge-apple-darwin14.5.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... /usr/bin/awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking ABI=64
checking whether /usr/bin/clang is gcc... yes
checking compiler /usr/bin/clang -O2 -pedantic -fomit-frame-pointer -m64 -I/opt/local/include... yes
checking compiler /usr/bin/clang -O2 -pedantic -fomit-frame-pointer -m64 -I/opt/local/include -mtune=sandybridge... yes
checking compiler /usr/bin/clang -O2 -pedantic -fomit-frame-pointer -m64 -mtune=sandybridge -I/opt/local/include -march=sandybridge... yes
checking for gcc... /usr/bin/clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/clang accepts -g... yes
...
(proceeds with compilation)

Change History (8)

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

Keywords: buildfromsource binary -b removed

That's odd, the url in the output above does not exist.

http://jog.id.distfiles.macports.org/macports/mpdistfiles/gmp

But this does:

http://jog.id.distfiles.macports.org/macports/distfiles/gmp/

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

The rsync module used to be called mpdistfiles. It was changed to just distfiles some years ago. The administrator of the jog.id mirror must have changed their server to match. Fixed mirror_sites.tcl in r146625 and updated wiki:Mirrors. This is tangential to the issue reported in this ticket, however.

I'm not able to reproduce the problem reported here. buildfromsource never and the -b flag both work for me on MacPorts 2.3.4. I can't explain this. I'm on 10.11, not 10.10, and I do already have some ports installed, but that shouldn't matter.

comment:3 Changed 8 years ago by jmroot (Joshua Root)

Note that gmp clears archive_sites in order to deliberately prevent installing from an archive. You should still get an error in binary-only mode though.

comment:4 Changed 8 years ago by burner1024 (Ilya Ivanov)

Strange: another port (ansible) does fail installation with the very same config and command.

(Edit: and I'm not sure if that's correct, too, since ansible doesn't need any compilation)

Last edited 8 years ago by burner1024 (Ilya Ivanov) (previous) (diff)

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

Replying to ilya@…:

Strange: another port (ansible) does fail installation with the very same config and command.

That doesn't sounds strange; that sounds like it's working as you intend. Sounds like the only reason why gmp is being handled differently is because it deliberately disabled the use of prepackaged archives, and MacPorts base may not have accounted for that situation.

(Edit: and I'm not sure if that's correct, too, since ansible doesn't need any compilation)

Compilation no, but assembly yes. There are still instructions in the portfile for what to install where, that must still be followed, if a prepackaged archive is not available. And one is not available for ansible, because its license does not allow it:

"ansible" is not distributable because its license "gpl" conflicts with license "OpenSSL" of dependency "openssl"

comment:6 in reply to:  5 Changed 8 years ago by burner1024 (Ilya Ivanov)

Replying to ryandesign@…:

That doesn't sounds strange; that sounds like it's working as you intend. Sounds like the only reason why gmp is being handled differently is because it deliberately disabled the use of prepackaged archives, and MacPorts base may not have accounted for that situation.

All right. I'm not sure what would be the correct behaviour for MacPorts in this situation, so I guess I'll just leave it in your hands. If I can assist somehow, please let me know.

comment:7 Changed 7 years ago by raimue (Rainer Müller)

Summary: Binary-only option doesn't work`port -b` or `buildfromsource never` do not prevent local compilation if Portfile clears archive_sites

comment:8 Changed 7 years ago by jmroot (Joshua Root)

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