Frescobaldi 3.2 installation with MacPorts

86 views
Skip to first unread message

John Helly

unread,
Aug 2, 2022, 9:00:04 PM8/2/22
to Frescobaldi
Aloha.  I just struggled through the MacPorts installation process with frescobaldi on Monterey.  There was major problem in resolving the Python modules that required modifying the 'Portfiles' for three modules. 

The fix is to add the line 'use_xcode  yes' to each of the dependency Portfiles.  This took me days to figure out so I thought I would pass it on.

I still don't have the Midi  playback working and don't know why (yet).

Caitlin Olsen

unread,
Aug 10, 2022, 8:26:03 PM8/10/22
to Frescobaldi
This is exactly what I've been struggling with - thank you! Which portfiles need that line added? And does it matter where to add it in the file? (I'm not a coder, so please bear with me 😅 )

John Helly

unread,
Aug 10, 2022, 9:33:53 PM8/10/22
to fresc...@googlegroups.com, Caitlin Olsen, j...@hellylab.net
Aloha.

Glad it helps.  I didn't keep a list since I was doing this by trial-and-error to see what works.  I'll do it again on another computer and get the list when I have time.

I believe the files are located here but that's just where I found the code when I looked in response to your question. 

/opt/local/var/macports/registry/portfiles>

There are some Portfiles in the source directory as well.  Not sure which ones I modified so if the registry ones don't suffice I would try the others:


At least, these need to be edited with 'use_xcode yes'

py310-poppler-qt5-21.1.0_1/a86a8c6046c7d4805425f595ac29dc5cd34a81014f5e0010fc5b19d0736531d4-3093/Portfile:        use_xcode       yes
py310-poppler-qt5-21.1.0_1/a86a8c6046c7d4805425f595ac29dc5cd34a81014f5e0010fc5b19d0736531d4-3093/Portfile:        use_xcode       yes
py310-pyqt5-5.15.7_0/1ae48c7f1137520a0db3db331d4310ba89b00c2b566c942d390861e345fa86df-2508/Portfile:    use_xcode       yes
py310-pyqt5-webengine-5.15.6_0/9e078a0deb1b9ec568d49ae5ef4f7cb4abcd7d9f077ce55e8eb257c120b558b5-2244/Portfile:    use_xcode       yes


Here's an excerpt from the Portfile for poppler:

# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4                                         

PortSystem          1.0
PortGroup           gobject_introspection 1.0
PortGroup           cmake 1.1
PortGroup           legacysupport 1.1

name                poppler
conflicts           poppler-devel xpdf-tools
set my_name         poppler
version             22.08.0
revision            0

license             GPL-2+
maintainers         {devans @dbevans} {mascguy @mascguy} openmaintainer
categories          graphics
platforms           darwin
homepage            https://poppler.freedesktop.org/

description         Poppler is a PDF rendering library based on the xpdf-3.0 code base.
long_description    {*}${description}

master_sites        ${homepage} \
                    gentoo

distname            ${my_name}-${version}
dist_subdir         ${my_name}

use_xz              yes
use_xcode           yes

checksums           rmd160  a2b5846509597599bf254f4b2357b0e69ea12b04 \
                    sha256  b493328721402f25cb7523f9cdc2f7d7c59f45ad999bde75c63c90604db0f20b \
                    size    1840700
...


One of them has an if-then type clause and you have to put it in the latter part of that code for some reason I don't understand.  Maybe it could be earlier but I didn't try to figure it out.

Sorry I didn't keep better notes.  If you have trouble, I'll try to help.

J.
--
Frescobaldi homepage: http://www.frescobaldi.org/
Mailing list: http://groups.google.com/group/frescobaldi
Issue tracker: https://github.com/frescobaldi/frescobaldi/issues
---
You received this message because you are subscribed to a topic in the Google Groups "Frescobaldi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/frescobaldi/NiFfBByWlRA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to frescobaldi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/frescobaldi/52f54b2f-a824-4ef4-a66b-e171c1ca8c11n%40googlegroups.com.

-- 
John Helly / 760.840.8660 / 808.205.9882 / http://www.sdsc.edu/~hellyj

Caitlin Olsen

unread,
Aug 11, 2022, 11:32:42 PM8/11/22
to Frescobaldi
So the problem there is that it won't even install all the ports, so I don't have portfiles for them. Specifically the error message that I got was that py310-poppler-qt5 failed to build. I tried installing that by itself without frescobaldi, but that didn't work either. The only one you listed that I actually have is py310-pyqt5-5.15.7_0 (although the subfolder has a different name than yours), and that portfile already has "use_xcode yes" in its text.

From among the ones that look like they might be related, these are the ones I do have portfiles for:

poppler-22.08.0_0 
poppler-data-0.4.11_0 
poppler-qt5-22.08.0_0 
py310-ly-0.9.7_0 
py310-mako-1.2.1_0 
py310-markdown-3.3.7_0 
py310-markupsafe-2.1.1_0 
py310-packaging-21.3_0 
py310-parsing-3.0.9_0 
py310-ply-3.11_0 
py310-pyqt-builder-1.13.0_0 
py310-pyqt5-5.15.7_0 
py310-pyqt5-sip-12.11.0_0 
py310-setuptools-63.4.2_0 
py310-sip-6.6.2_0 
py310-toml-0.10.2_0 
python_select-0.3_9 
python3_select-0.0_2 
python310-3.10.6_0
qt5-5.15.5_0 
qt5-qt3d-5.15.5_0 
qt5-qtbase-5.15.5_0 
qt5-qtconnectivity-5.15.5_0 
qt5-qtdeclarative-5.15.5_0 
qt5-qtgamepad-5.15.5_0 
qt5-qtgraphicaleffects-5.15.5_0 
qt5-qtimageformats-5.15.5_0 
qt5-qtlocation-5.15.5_0 
qt5-qtmacextras-5.15.5_0 
gt5-qtmultimedia-5.15.5_0 
qt5-qtnetworkauth-5.15.5_0 
qt5-qtquickcontrols-5.15.5_0 
qt5-qtquickcontrols2-5.15.5_0 
qt5-qtremoteobjects-5.15.5_0 
qt5-qtscript-5.15.5_0 
qt5-qtscxml-5.15.5_0 
qt5-qtsensors-5.15.5_0 
qt5-qtserialbus-5.15.5_0 
qt5-qtserialport-5.15.5_0 
qt5-qtspeech-5.15.5_0 
qt5-qtsvg-5.15.5_0 
qt5-qttools-5.15.5_0 
qt5-attranslations-5.15.5_0 
qt5-qtwebchannel-5.15.5_0 
qt5-qtwebsockets-5.15.5_0 
qt5-qtxm|patterns-5.15.5_0 
qt5-sqlite-plugin-5.15.5_0

I truly have no idea where to start...

John Helly

unread,
Aug 12, 2022, 12:10:40 AM8/12/22
to fresc...@googlegroups.com, Caitlin Olsen, hel...@ucsd.edu
Sounds like what happened to me.  I came to the conclusion that my python environment was a mess from a history of installs that I never really understood.  Python itself is a mess IMHO, anyway, but some good stuff is built with it.

Ultimately, I completely uninstalled macports and all versions of python (including Apple's) and re-installed macports.  Then went through the xcode editing for each successive module that would not build.  That's why it took so long but it finally worked.

J.
You received this message because you are subscribed to the Google Groups "Frescobaldi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to frescobaldi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/frescobaldi/26a71c37-0883-468f-a5c3-b7203ff96d12n%40googlegroups.com.

-- 
John Helly, University of California, San Diego / San Diego Supercomputer Center / Scripps Institution of Oceanography / 760 840 8660 mobile / http://www.sdsc.edu/~hellyj
ORCID ID: orcid.org/0000-0002-3779-0603

John Helly

unread,
Aug 12, 2022, 12:12:54 AM8/12/22
to fresc...@googlegroups.com, Caitlin Olsen, hel...@ucsd.edu
Another important point.  Once you've cleaned up the python environment (if you choose to do so), as you install the frescobaldi port, it will install all the dependencies except, of course, the ones that fail.  Those are the ones that need editing.

Hope that helps.

J.

On 8/11/22 17:32, Caitlin Olsen wrote:
You received this message because you are subscribed to the Google Groups "Frescobaldi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to frescobaldi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/frescobaldi/26a71c37-0883-468f-a5c3-b7203ff96d12n%40googlegroups.com.

Caitlin Olsen

unread,
Aug 12, 2022, 1:00:19 AM8/12/22
to Frescobaldi
I'm not at all confident that I could do that... but even if I did, I don't understand how I would edit the portfiles of the failed dependencies, because the ones that fail don't create portfiles, at least that I can tell. Am I misunderstanding?

Davide Liessi

unread,
Aug 12, 2022, 4:54:39 AM8/12/22
to fresc...@googlegroups.com, John Helly, Caitlin Olsen
Dear all,

I am sorry I have not been able to do anything related to Frescobaldi
(sadly including answering email about it) in the latest months.

Il giorno gio 11 ago 2022 alle ore 03:33 John Helly <j...@hellylab.net>
ha scritto:
> I believe the files are located here but that's just where I found the code when I looked in response to your question.
> /opt/local/var/macports/registry/portfiles>

This is not MacPorts' Portfile repository: this is where MacPorts
stores a copy of Portfiles when they are installed so that it can use
the same version of the Portfile to deactivate/activate/uninstall the
port.
You should NEVER touch anything in there: it will have no effect on
new installations of the port and it may compromise MacPorts' ability
to cleanly manage the installed port.
Anyway, if you changed a Portfile you didn't have installed, it surely
wasn't in there.

I believe this explains also

Il giorno ven 12 ago 2022 alle ore 05:32 Caitlin Olsen
<cno...@gmail.com> ha scritto:
> So the problem there is that it won't even install all the ports, so I don't have portfiles for them.

and

Il giorno ven 12 ago 2022 alle ore 07:00 Caitlin Olsen
<cno...@gmail.com> ha scritto:
> I don't understand how I would edit the portfiles of the failed dependencies, because the ones that fail don't create portfiles, at least that I can tell. Am I misunderstanding?

Regarding

Il giorno ven 12 ago 2022 alle ore 06:10 'John Helly' via Frescobaldi
<fresc...@googlegroups.com> ha scritto:
> I completely uninstalled macports and all versions of python (including Apple's) and re-installed macports.

what do you mean that you uninstalled Apple's Python?
I believe that Monterey by itself does not ship any Python and that
there is a Python 3 in the Command Line Developer Tools.
Did you completely uninstall and reinstall the latter?

Anyway, completely uninstalling and reinstalling everything is very
rarely required, but it does not harm.

Il giorno ven 12 ago 2022 alle ore 06:10 'John Helly' via Frescobaldi
<fresc...@googlegroups.com> ha scritto:
> Then went through the xcode editing for each successive module that would not build.

In this case I believe you edited the Portfiles from the Portfile
repository and not from the registry, which is good.

To find the Portfile that will be used to install a port, use the
`port file` command, e.g. `port file frescobaldi`.
However, changes made to Portfiles are not permanent, as they are
overwritten when you do `sudo port selfupdate`, which should be done
rather frequently and at least once a year.
So it is better to fix the problem in MacPorts' repository.

Anyway, if you have problems with a port you should open a ticket at
https://trac.macports.org/
If you find a solution, you should upload the change as a pull request at
https://github.com/macports/macports-ports
or at least write to
macport...@lists.macports.org

Regarding the ports mentioned by John, I see that the `use_xcode yes`
line was already present in py310-pyqt5 and it was added in
py310-pyqt5-webengine 5 days ago.
The line is not present in poppler, but we see from
https://ports.macports.org/port/poppler/details/ that it builds
correctly in all systems, so there is no need to change it: in case it
does not build on your system, please open a ticket.
As for py310-poppler-qt5, I now see from
https://ports.macports.org/port/py310-poppler-qt5/details/ that it
does not build on the latest versions of macOS, but since no ticket
was opened and unfortunately I am stuck with High Sierra, I had no
idea.
It may be that `use_xcode yes` fixes the problem, I'll have a look as
soon as I can.

Il giorno ven 12 ago 2022 alle ore 05:32 Caitlin Olsen
<cno...@gmail.com> ha scritto:
> Specifically the error message that I got was that py310-poppler-qt5 failed to build.

The error message also says to check the log file for more information.
It would help me to see that log file.
You can find out the path to the log file again with `port logfile
py310-poppler-qt5`.
Just to be sure that the log file is complete, you could do `sudo port
clean py310-poppler-qt5` and then again `sudo port install
py310-poppler-qt5`.
You can send the log file here or directly to me; I'll take care of
opening the corresponding ticket if necessary.

Best wishes.
Davide

John Helly

unread,
Aug 12, 2022, 5:14:49 AM8/12/22
to fresc...@googlegroups.com, Caitlin Olsen, j...@hellylab.net
The ones that fail do create Portfiles, they just don't build.  You have to download them first so they can be installed so they are indeed there unless you haven't downloaded them.  Which, I think, may happen if the python environment is confused.

At any rate, that's what I did.  I don't have any other suggestions.
J.

John Helly

unread,
Aug 12, 2022, 5:16:56 AM8/12/22
to Davide Liessi, fresc...@googlegroups.com, j...@hellylab.net, Caitlin Olsen
Makes sense.  That's why I think it was perhaps in the source directory
tree that I made the mods.  I have to do this again on another computer
at some point and I'll keep better notes and share them if it's any help.

J.

Caitlin Olsen

unread,
Aug 12, 2022, 9:42:18 PM8/12/22
to Frescobaldi
Thank you both so much for your help. I'm attaching the log file here, and I appreciate you taking care of opening the ticket because my familiarity with github is literally only what I've been able to figure out in this process, lol. I hope this is helpful.
main.log

John Helly

unread,
Aug 12, 2022, 10:33:17 PM8/12/22
to fresc...@googlegroups.com, Caitlin Olsen, j...@hellylab.net
Happy to try to help.

BTW, the xcode edit is the advocted solution in the MacPorts forum.  That's where I got the idea.  The didn't provide any details on how to do it, though.

J.
--
Frescobaldi homepage: http://www.frescobaldi.org/
Mailing list: http://groups.google.com/group/frescobaldi
Issue tracker: https://github.com/frescobaldi/frescobaldi/issues
---
You received this message because you are subscribed to a topic in the Google Groups "Frescobaldi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/frescobaldi/NiFfBByWlRA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to frescobaldi...@googlegroups.com.

Davide Liessi

unread,
Aug 18, 2022, 5:40:44 AM8/18/22
to fresc...@googlegroups.com
Il giorno sab 13 ago 2022 alle ore 03:42 Caitlin Olsen
<cno...@gmail.com> ha scritto:
> I'm attaching the log file here

Indeed that's the same problem as the one with py-pyqt5.
I have just opened a pull request with the fix:
https://github.com/macports/macports-ports/pull/15773
It will hopefully be added to the repository soon.

Best wishes.
Davide
Reply all
Reply to author
Forward
0 new messages