Discussion:
[MacPorts] #57454: rebuild Boost with GCC-4.8
MacPorts
2018-10-27 01:01:36 UTC
Permalink
#57454: rebuild Boost with GCC-4.8
---------------------------+--------------------
Reporter: WenyiY | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Keywords: boost rebuild | Port:
---------------------------+--------------------
I met boost building issue when trying to build mlpack. So I searched
online and found a similar post which has the same problem as mine, which
is: https://stackoverflow.com/questions/19912862/compiling-boostprogram-
options-on-mac-os-x-with-g-4-8-mac-ports

When I'm trying to do the solution the comment suggest which is compile
boost by gcc48 by having the command line {{{sudo port -ns upgrade --force
boost configure.compiler=macports-gcc-4.8}}}, but macports failed by
showing the output as
{{{---> Computing dependencies for boost}}}
{{{The following dependencies will be installed: gcc48}}}
{{{Continue? [Y/n]: y}}}
{{{Error: Follow https://guide.macports.org/#project.tickets to report a
bug.}}}
I'm lost and don't know what to do now. Please send some help
--
Ticket URL: <https://trac.macports.org/ticket/57454>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-27 03:14:54 UTC
Permalink
#57454: rebuild Boost with GCC-4.8
---------------------+---------------------------
Reporter: WenyiY | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords: boost rebuild
Port: |
---------------------+---------------------------

Comment (by kencu):

Hi. Please be clear on what your actual end goal is here, so we can help
you get there.

- What system are you on?
- What are you trying to install?

You will most likely not get anywhere on MacPorts trying to build anything
with `gcc4.8`, so that is not your solution.
--
Ticket URL: <https://trac.macports.org/ticket/57454#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-27 03:16:32 UTC
Permalink
#57454: some kind of issue (as yet unclear) trying to build boost on an unknown
system
---------------------+--------------------
Reporter: WenyiY | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords:
Port: boost |
---------------------+--------------------
Changes (by kencu):

* cc: michaelld (added)
* keywords: boost rebuild =>
* port: => boost
--
Ticket URL: <https://trac.macports.org/ticket/57454#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-27 03:39:09 UTC
Permalink
#57454: some kind of issue (as yet unclear) trying to build boost on an unknown
system
---------------------+--------------------
Reporter: WenyiY | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords:
Port: boost |
---------------------+--------------------

Comment (by WenyiY):

Sorry for not making it clear. I am on MacOS High Sierra, and trying to
build mlpack library. But when I typed {{{make ../}}} for mlpack after
cmake it, I'm having the same problem as shown on the link I pasted at the
beginning. Which some comments under that link said it was boost issue.
Change clang++ to g++ might help.
I was just trying around see how to solve this "make mlpack" issue.
--
Ticket URL: <https://trac.macports.org/ticket/57454#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-27 04:27:37 UTC
Permalink
#57454: some kind of issue (as yet unclear) trying to build boost on an unknown
system
---------------------+--------------------
Reporter: WenyiY | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords:
Port: boost |
---------------------+--------------------

Comment (by kencu):

FYI, I just thought I'd try installing `mlpack`, and it seemed to install
without any trouble:
{{{
sudo port -v install mlpack
}}}
{{{
$ port -v installed mlpack
The following ports are currently installed:
mlpack @2.2.5_2 (active) platform='darwin 10' archs='x86_64'
date='2018-10-26T20:59:49-0700'
}}}
--
Ticket URL: <https://trac.macports.org/ticket/57454#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-27 04:31:19 UTC
Permalink
#57454: some kind of issue (as yet unclear) trying to build boost on an unknown
system
---------------------+--------------------
Reporter: WenyiY | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords:
Port: boost |
---------------------+--------------------

Comment (by kencu):

I think perhaps you might take a moment and review how MacPorts works.

To find out what MacPorts offers, you can `port search XXXX` for some port
that MacPorts offers, e.g. `mlpack`.

To install a port, you `sudo port -v install XXXX` -- whatever it is.

Then buzzers buzz, whizzers whizz, and the next thing you know, 99% of the
time, your software is all installed. You don't have to do any of that
`cmake ../` business using MacPorts as a consumer.
--
Ticket URL: <https://trac.macports.org/ticket/57454#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-27 19:54:55 UTC
Permalink
#57454: some kind of issue (as yet unclear) trying to build boost on an unknown
system
---------------------+--------------------
Reporter: WenyiY | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords:
Port: boost |
---------------------+--------------------
Post by MacPorts
I met boost building issue when trying to build mlpack. So I searched
online and found a similar post which has the same problem as mine, which
is: https://stackoverflow.com/questions/19912862/compiling-boostprogram-
options-on-mac-os-x-with-g-4-8-mac-ports
When I'm trying to do the solution the comment suggest which is compile
boost by gcc48 by having the command line {{{sudo port -ns upgrade
--force boost configure.compiler=macports-gcc-4.8}}}, but macports failed
by showing the output as
{{{---> Computing dependencies for boost}}}
{{{The following dependencies will be installed: gcc48}}}
{{{Continue? [Y/n]: y}}}
{{{Error: Follow https://guide.macports.org/#project.tickets to report a
bug.}}}
I'm lost and don't know what to do now. Please send some help
New description:

I met boost building issue when trying to build mlpack. So I searched
online and found a similar post which has the same problem as mine, which
is: https://stackoverflow.com/questions/19912862/compiling-boostprogram-
options-on-mac-os-x-with-g-4-8-mac-ports

When I'm trying to do the solution the comment suggest which is compile
boost by gcc48 by having the command line {{{sudo port -ns upgrade --force
boost configure.compiler=macports-gcc-4.8}}}, but macports failed by
showing the output as
{{{
---> Computing dependencies for boost
The following dependencies will be installed: gcc48
Continue? [Y/n]: y
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
}}}
I'm lost and don't know what to do now. Please send some help

--
--
Ticket URL: <https://trac.macports.org/ticket/57454#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-29 23:57:56 UTC
Permalink
#57454: some kind of issue (as yet unclear) trying to build boost on an unknown
system
---------------------+--------------------
Reporter: WenyiY | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords:
Port: boost |
---------------------+--------------------

Comment (by WenyiY):

So I tried the command line you gave me, but it still failed at 55% when
building {{{target mlpack_pca}}}.
The error is below:
{{{
[ 55%] Built target mlpack_pca
make[1]: Leaving directory
`/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_mlpack/mlpack/work/build'
make: *** [all] Error 2
make: Leaving directory
`/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_mlpack/mlpack/work/build'
Command failed: cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_mlpack/mlpack/work/build"
&& /usr/bin/make -j4 -w VERBOSE=ON
Exit code: 2
Error: Failed to build mlpack: command execution failed
Error: See
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_mlpack/mlpack/main.log
for details.
Error: rev-upgrade failed: Error rebuilding mlpack
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
---> Some of the ports you installed have notes:
hdf5 has the following notes:
Mac users may need to set the environment variable
"HDF5_USE_FILE_LOCKING" to the five-character string "FALSE" when
accessing network
mounted files. This is an application run-time setting, not a
configure or build setting. Otherwise errors such as "unable to open
file" or "HDF5 error" may be encountered.
libpsl has the following notes:
libpsl API documentation is provided by the port 'libpsl-docs'.
}}}
--
Ticket URL: <https://trac.macports.org/ticket/57454#comment:7>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-30 00:23:45 UTC
Permalink
#57454: some kind of issue (as yet unclear) trying to build boost on an unknown
system
---------------------+--------------------
Reporter: WenyiY | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords:
Port: boost |
---------------------+--------------------

Comment (by kencu):

Thanks! To help you now get the rest of the way, we need to see this file:
{{{
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_mlpack/mlpack/main.log
}}}
Please don't copy-paste it into a window. Copy that file to your desktop,
and then upload it with the "attach file" feature here on this page, with
perhaps a short message.
--
Ticket URL: <https://trac.macports.org/ticket/57454#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-30 00:32:14 UTC
Permalink
#57454: some kind of issue (as yet unclear) trying to build boost on an unknown
system
---------------------+--------------------
Reporter: WenyiY | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords:
Port: boost |
---------------------+--------------------
Changes (by WenyiY):

* Attachment "main.log" added.

Here is the main.log file.
--
Ticket URL: <https://trac.macports.org/ticket/57454>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-30 00:49:19 UTC
Permalink
#57454: some kind of issue (as yet unclear) trying to build boost on an unknown
system
---------------------+--------------------
Reporter: WenyiY | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords:
Port: boost |
---------------------+--------------------

Comment (by kencu):

I found this in your log:
{{{
Found PkgConfig: /usr/local/bin/pkg-config
}}}
That shows that you have something installed in `/usr/local`. Maybe you
have a lot of things installed in there? At any rate, anything you have
installed in `/usr/local` will interfere with MacPorts, often severely.

The fastest way to clean this up, for me, would be to do this:
{{{
sudo mv /usr/local /usr/local-saved
}}}
That just gets the whole mess in /usr/local out of the way, whatever made
it into there. Then do this:
{{{
sudo port clean mlpack
}}}
to clean out all the old build attempt, with whatever misconfigurations
might have slipped in there.

Then do this:
{{{
sudo port -v install mlpack
}}}
and report back success or failure, with another log if you have a
failure.

Good luck!
--
Ticket URL: <https://trac.macports.org/ticket/57454#comment:9>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-30 01:35:32 UTC
Permalink
#57454: some kind of issue (as yet unclear) trying to build boost on an unknown
system
---------------------+--------------------
Reporter: WenyiY | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords:
Port: boost |
---------------------+--------------------

Comment (by WenyiY):

Thank you for find out this issue, I did have a lot of stuff installed
under this path, like git, Homebrew. I wonder if I clean these up, it will
affect some other programs I installed inside?
Also, when I was trying to clean it using {{{sudo mv /usr/local /usr
/local-saved}}}, it returned {{{mv: rename /usr/local to /usr/local-saved:
Operation not permitted}}}.
--
Ticket URL: <https://trac.macports.org/ticket/57454#comment:10>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-30 02:56:32 UTC
Permalink
#57454: some kind of issue (as yet unclear) trying to build boost on an unknown
system
---------------------+--------------------
Reporter: WenyiY | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords:
Port: boost |
---------------------+--------------------

Comment (by kencu):

Oh, yeah -- I guess that would be system integrity protection at work on
that OS version.

Sadly, MacPorts and homebrew (and anything else installed in /usr/local)
don't all play well together. You'll have to decide. Naturally, I'd choose
MacPorts...
--
Ticket URL: <https://trac.macports.org/ticket/57454#comment:11>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-31 17:45:33 UTC
Permalink
#57454: some kind of issue (as yet unclear) trying to build boost on an unknown
system
---------------------+--------------------
Reporter: WenyiY | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords:
Port: boost |
---------------------+--------------------

Comment (by WenyiY):

Ah, I see. Now I have to make a decision between the two. Thank you. That
solve my problem
--
Ticket URL: <https://trac.macports.org/ticket/57454#comment:12>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-03 17:34:13 UTC
Permalink
#57454: some kind of issue (as yet unclear) trying to build boost on an unknown
system
----------------------+--------------------
Reporter: WenyiY | Owner: (none)
Type: defect | Status: closed
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: invalid | Keywords:
Port: boost |
----------------------+--------------------
Changes (by mf2k):

* status: new => closed
* resolution: => invalid
--
Ticket URL: <https://trac.macports.org/ticket/57454#comment:13>
MacPorts <https://www.macports.org/>
Ports system for macOS
Loading...