Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#58717 closed defect (fixed)

MacOS 10.7.5: lilypond-devel gets rebuilt again and again

Reported by: lemzwerg (Werner Lemberg) Owned by: nerdling (Jeremy Lavergne)
Priority: Normal Milestone:
Component: ports Version:
Keywords: lion Cc: cjones051073 (Chris Jones)
Port: lilypond-devel

Description

[macports-ports 295206680aea1f4f9b8a2a17a0d318aa514daf50]
[macports-base 6f8aca0267707bd4d8e122148e3f88af57029a73]

doing

sudo port upgrade lilypond-devel

on my MacOS 10.7.5 box (with cxx_stdlib libc++ in macports.conf as recommended for this Mac version) causes the following warning:

lilypond-devel is using libstdc++ (this installation is configured to use libc++)

and MacPorts try to build it again and again, aborting after three tries.

Attachments (1)

lilypond-devel.rev-upgrade.log.xz (5.5 KB) - added by lemzwerg (Werner Lemberg) 5 years ago.
Output of 'sudo port -d -y rev-upgrade'

Download all attachments as: .zip

Change History (14)

Changed 5 years ago by lemzwerg (Werner Lemberg)

Output of 'sudo port -d -y rev-upgrade'

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

In the future, please add the port maintainer(s) to Cc (port info --maintainers lilypond-devel), if any.

comment:2 Changed 5 years ago by mf2k (Frank Schima)

Owner: set to nerdling
Status: newassigned

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

lilypond-devel is forced to build with gcc as apparently clang won't work, therefore it can't build against libc++. It looks like lilypond doesn't have this issue, though, so perhaps you might find that acceptable for now.

I guess lilypond-devel will have to be examined to see if it's safe to put a c++ standard lib override in the Portfile for this specific port.

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

I installed lilypond-devel on my 10.6.8 system configured with libc++.

It installed without any issues, building with gcc8 against /opt/local/lib/libgcc/libstdc++.6.dylib.

It generated no errors after installation, and sudo port -v rev-upgrade generates no errors.

SO ... works for me. Now to figure out why it doesn't work for you, I guess.

comment:5 Changed 5 years ago by kencu (Ken)

Here is what I would do:

first clean everything up

sudo port clean lilypond-devel

then try lilypond

sudo port -v install lilypond

if that works, at least you are in a runnable state. If you then really want to try lilypond-devel, do this:

sudo port -v -f deactivate lilypond
sudo port -v -s install lilypond-devel

(Don't forget that when you have changed your standard lib to libc++, you also have to set buildfromsource always to make sure you are building it yourself.)

Last edited 5 years ago by kencu (Ken) (previous) (diff)

comment:6 Changed 5 years ago by lemzwerg (Werner Lemberg)

Thanks for the useful tips. However, this is heading into the wrong direction. Given that the last major adjustments to the lilypond-devel portfile were done by me, I know that it worked previously without this problem :-)

As far as I can remember, I haven't manually installed any new package since the last successful lilypond-devel upgrade (soon after commit 46032f4c4d85fb from June 10th), which makes me believe that the issue is not with my MacPorts setup but that one of the recent changes in another bundle (maybe the deprecation of older clang compilers? maybe the forced installation of other packages due to new dependencies?) or even in the MacPorts infrastructure itself causes this – see the used git versions mentioned in the OP.

So: How can I help investigate this?

comment:7 Changed 5 years ago by cjones051073 (Chris Jones)

Any port that forces the use of gcc/libstdc++ is in my opinion doomed to have problems within MacPorts, where clang/libc++ is the (strongly) preferred option.

In my opinion whatever the reasons are for this are the crux of the issue here, and your time would I think be best spent investigating and fixing whatever is preventing lilypond-devel from being built with clang, rather than trying to keep a build with gcc struggling along.

comment:8 Changed 5 years ago by lemzwerg (Werner Lemberg)

Alas, compilation with clang is *really* not possible currently since lilypond heavily relies on a special C++ interpretation of gcc; see

https://lists.gnu.org/archive/html/bug-lilypond/2016-07/msg00071.html

and the thread starting at

http://lists.llvm.org/pipermail/cfe-users/2018-November/001417.html

We neither have the manpower nor the knowledge to fix that in the near future. It would be really a pity if MacPorts will no longer support projects that need gcc.

comment:9 in reply to:  8 Changed 5 years ago by cjones051073 (Chris Jones)

Replying to lemzwerg:

Alas, compilation with clang is *really* not possible currently since lilypond heavily relies on a special C++ interpretation of gcc; see

https://lists.gnu.org/archive/html/bug-lilypond/2016-07/msg00071.html

and the thread starting at

http://lists.llvm.org/pipermail/cfe-users/2018-November/001417.html

We neither have the manpower nor the knowledge to fix that in the near future. It would be really a pity if MacPorts will no longer support projects that need gcc.

Thanks fine, but you need to acknowledge you are relying on non-standards compliant behaviour of gcc here, and long term that is never a good idea.

b.t.w. if the lilypond(-devel} ports need to force the use of libstdc++(i.e. gcc), you probably need to indicate this in the portfiles with

configure.cxx_stdlib    libstdc++

comment:10 Changed 5 years ago by cjones051073 (Chris Jones)

Cc: cjones051073 added

comment:11 Changed 5 years ago by jmroot (Joshua Root)

The cxx11 portgroup doesn't really handle this case very well. Also 2.6.0 sort of works backwards compared with 2.5.4 in terms of choosing a compiler and stdlib: it first decides on a value for configure.cxx_stdlib based on cxx_stdlib and the required language standard, and then chooses compilers that can use the chosen stdlib. There could be room for improvement when a port starts with a compiler choice and wants the rest to match that.

Anyway, yeah, if you want to use a stdlib that is incompatible with what the other ports are using, you have to explicitly set it in the portfile. It should be macports-libstdc++ BTW, as libstdc++ is the system version which is too old.

Last edited 5 years ago by jmroot (Joshua Root) (previous) (diff)

comment:12 Changed 5 years ago by lemzwerg (Werner Lemberg)

Thanks for the help.

Last edited 5 years ago by lemzwerg (Werner Lemberg) (previous) (diff)

comment:13 Changed 5 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: assignedclosed

In e89c23ea36cb639b30e1d5fbc61685dd4fc6b95b/macports-ports (master):

lilypond-devel: indicate C++ stdlib used

Fixes: #58717

Note: See TracTickets for help on using tickets.