On Friday, February 19, 2021 at 11:07:17 AM UTC+1 Albrecht Schlosser wrote:
On 2/19/21 10:02 AM Manolo wrote:
>
> Under macOS, CMake-based build with OPTION_USE_PANGO (and
> OPTION_APPLE_X11) turned on fails because variables such as
> HAVE_LIB_PANGO and HAVE_LIB_PANGOCAIRO remain undefined.
> That results from recent changes in CMake-related files.
Can you tell me which exact changes? Commits (hashes)?
I will search that information I don't have at this point yet.
> I propose the attached small patch to fix that. It adds more paths
> where to search for pango libs, necessary under macOS, but that
> shouldn't do harm on other backgrounds.
>
> Albrecht: can you validate this proposal, please?
I'll take a look into it but I need a little help from you so I can test
this myself.
That's not strictly necessary but I'd really like to be able to build
with X11 on my own new MacBook (M1).
Can you tell me what I need to install to build with X11 and Pango on
macOS? Note that I'm a complete noob on macOS.
So far I installed:
(1) the "Xcode (?) command line tools". When I entered 'git' I got a
popup that I needed to install the command line tools and I answered
"yes" / confirmed.
That's good.
Update: later I installed a system update (Big Sur 11.2.1) and the
command line tools were "gone". I had to reinstall. Is this normal?
Yes it is normal.
(2) CMake: I downloaded the .dmg file from CMake and "installed" it into
the Applications folder.
That's what I use too, as I like to use the GUI mode.
With this config I could build FLTK and all the demos (default: ARM).
Then I changed the CMake option to build universal apps and built again:
bingo, universal apps created.
We knew already from another user that FLTK builds and runs well on M1.
What I still ignore is whether x86_64 FLTK-based apps run on the M1, through Rosetta.
I did not yet install Xcode, homebrew, or any other tools. I'd like to
have a complete build environment for FLTK so I can test my
modifications, particularly CMake but also configure / autoconf (missing
now), X11 etc.
Should I install homebrew? (How?)
I'm not a homebrew user. I use Fink instead
https://www.finkproject.org/
because I liked its choice to put everything in a specific part of the file system
isolated from macOS. That used to be /sw and has been changed to /opt/sw more recently.
There's a problem now: Fink does not support macOS 11 yet. So you can't install it (I tried).
However, my version inherited from macOS 10.15 works well with 11.x. So I still use it.
I can share it.
My use of Fink explains why CMake files prepared for Linux need change: CMake command
find_library(HAVE_LIB_PANGO pango-1.0 ${CMAKE_LIBRARY_PATH} )
doesn't find the pango lib because it's not in CMAKE_LIBRARY_PATH which doesn't include /opt/sw/lib.
The modified CMake command
find_library(HAVE_LIB_PANGO pango-1.0 ${CMAKE_LIBRARY_PATH} ${PANGOXFT_LIBRARY_DIRS})
works for a user of Fink without hardcoded /opt/sw string.
Anyway, that situation reflects the fact there's not a single source of packaged software
for macOS, and FLTK should be able to support several setups, if possible.
How do I install autoconf?
Normally, you would get it via Fink. In the absence of that, download M4
Then do
./configure
make
make install
once for m4 and once for autoconf,.
Then you need to install Xquartz from https://www.xquartz.org/
This will put an app called XQuartz in /Applications/Utilities/ that will be your X server.
XQuartz automagically starts when an X11-based app is started.
At that point you should have enough to do that in FLTK:
autoconf -f
./configure --enable-x11
make
and obtain working X11-based FLTK test apps, provided /usr/local/bin is in your path.
I'll see what is possible for pango. I got it via Fink.
What else should I install and how do I do this, what do you recommend?
All help would be very much appreciated. TIA.
Don't hesitate to ask.