Compiling and using master on macOS

Stephan Witt st.witt at gmx.net
Tue Jul 7 07:17:29 UTC 2020


Am 07.07.2020 um 07:30 schrieb Daniel <xracoonx at gmx.de>:
> 
> On 2020-07-07 00:24, Stephan Witt wrote:
>> Am 06.07.2020 um 09:59 schrieb Daniel <xracoonx at gmx.de>:
>>> 
>>> On 2020-03-15 21:37, Stephan Witt wrote:
>>>> Am 15.03.2020 um 17:16 schrieb Daniel <xracoonx at gmx.de>:
>>>>> 
>>>>> Hi,
>>>>> 
>>>>> I am about to try compiling and using master on macOS. I just has a look at INSTALL.MacOSX. It mentions Qt version 4. That seems a bit outdated. But I guess that I am looking at the latest guide to compile on macOS, right?
>>>> Yes, it’s outdated. It should work with Qt4 - but Qt4 cannot be used on recent macOS.
>>>> Basically I’m using the script LyX-Mac-binary-release.sh in development folder. That’s much easier than other options, IMO.
>>>> First step is to install Xcode and the automake and/or cmake utilities. This can be done with macports or homebrew. I’m using macports.
>>>> Second step is to get Qt5 - as source or binary distribution. I’m using the source tarball and build Qt5 myself.
>>>> Optional components are the spell checker and libmagic frameworks.
>>>> Finally I start development/LyX-Mac-binary-release.sh with
>>>> --enable-cxx11
>>>> --with-qt-dir=/path/to/qt5
>>>> Stephan
>>> 
>>> Thanks. Finally came around trying it on macOS. I take it one has to run the last command with sh, right? So, from the lyx directory (in the lyxgit directory) I execute
>>> 
>>> sh development/LyX-Mac-binary-release.sh --enable-cxx11 --with-qt-dir=/Users/<username>/Qt/5.9.9
>>> 
>>> (where I replace <username> by my macOS user name. Unfortunately, I get the following:
>>> 
>>> : command not found-binary-release.sh: line 2:
>>> : command not found-binary-release.sh: line 4:
>>> : command not found-binary-release.sh: line 9:
>>> : command not found-binary-release.sh: line 19:
>>> : command not found-binary-release.sh: line 23:
>>> : command not found-binary-release.sh: line 27:
>>> ': not a valid identifiery-release.sh: line 28: unset: `LD_LIBRARY_PATH
>>> : command not found-binary-release.sh: line 29:
>>> : command not found-binary-release.sh: line 44:
>>> : command not found-binary-release.sh: line 49:
>>> development/LyX-Mac-binary-release.sh: line 53: syntax error near unexpected tok'n `in
>>> 'evelopment/LyX-Mac-binary-release.sh: line 53: `case "${QtVersion}:${QtAPI}" in
>>> 
>>> By the way, if finally successful, where will this put the LyX.app?
>>> 
>>> Daniel
>> I’ve made a protocol of the steps I took to build the package on a new system. See the attached log. Probably the crucial thing is the mklyx-2.3.4.3.sh script.
>> I’m used to configure and build LyX out of source. I have a working directory with one or more versions of LyX source code and a directory lyx-build for the results. For Qt I have a source directory and an install target in parallel, the build directory is in lyx-build.
>> $ ls /Users/Shared/LyX
>> lyx-2.3.4.3 (source)
>> lyx-2.3.5.2 (source)
>> lyx-build (directory)
>> qt-5.9.9-frameworks-cocoa-x86_64  (QTDIR for 5.9.9)
>> qt-everywhere-opensource-src-5.9.9 (source)
>> The lyx-build contains the build directory, the installed package (LyX.app) and the resulting disk image.
>> $ ls /Users/Shared/LyX/
>> LyX-2.3.4.3+qt5-x86_64-cocoa.dmg (disk image)
>> LyX-2.3.4.3.app (working app)
>> LyX-2.3.4.3.build (binaries)
>> LyX-2.3.5.2+qt5-x86_64-cocoa.dmg (disk image)
>> LyX-2.3.5.2.app (working app)
>> LyX-2.3.5.2.build (binaries)
>> qt-5.9.9-build-x86_64 (binaries)
>> The /bin/sh on a Mac is in fact a bash, IMO.
>> Stephan
> 
> I am using git to download the lyx source and qt installer. But the steps should be the same except for the unpacking and setting my own directories, right?

I’m not sure the Qt installer puts the frameworks in the same structure as the „make install“ from source. I never tried that.

> Also what does
> 
> osascript -e 'tell application "Finder" to display notification "LyX is great stuff"'
> 
> do? It looks strange.

After sending the mail I realized the need to explain this line too :)

It tries to control the Finder from command line. The reason is to trigger the security guard (SIP) of the Mac OS.

If you never did that before you’re asked to give your OK for this and you should see this in system control. See screenshot.

If you say „No“ you cannot build a nice disk image with the background picture presenting the green arrow. Beware: you’re not asked again and it’s really painful to correct it later, AFAIK.

Stephan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200707/7ebbdfdd/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bildschirmfoto 2020-07-07 um 09.11.19.png
Type: image/png
Size: 260297 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200707/7ebbdfdd/attachment-0001.png>


More information about the lyx-devel mailing list