Compiling and using master on macOS

Daniel xracoonx at gmx.de
Sat Jul 11 07:07:28 UTC 2020


On 2020-07-10 23:22, Stephan Witt wrote:
> Am 08.07.2020 um 17:42 schrieb racoon <xracoonx at gmx.de>:
>>
>>
>>
>> On 2020-07-08 08:28, Stephan Witt wrote:
>>> Am 07.07.2020 um 07:35 schrieb Daniel <xracoonx at gmx.de>:
>>>>
>>>> On 2020-07-07 07:30, Daniel wrote:
>>>>> 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
>>>
>>> Yes, that’s true - this is the build from the shipped tar file for 2.3.4.3. But it works for git clones too.
>>>
>>> The difference to master is the name of the directory and this is your choice. I’m using „lyx“ for it. I have another git clone for stable named „lyx-2.3.x“.
>>>
>>> The resulting applications are placed in lyx-build and named according to the AC_INIT macro in configure.ac (e.g. LyX,2.4.0dev => LyX-2.4.0dev.app).
>>>
>>> In case you want to do the single steps w/o the build script you may try the following:
>>>
>>> 1. create a dedicated build dir - e.g. lyx-build/master
>>>
>>> 2. create or update the configure script - run autogen.sh in your git checkout (in place)
>>
>> In this step I get:
>>
>> % sh autogen.sh
>> : command not found
>> : command not found
>> : command not found:
>> 'utogen.sh: line 18: syntax error near unexpected token `in
>> 'utogen.sh: line 18: `case $automake_version in
>>
>> I guess it does not fails for some reason?
> 
> This is weird. There must be something very special with your shell. Here I have:
> 
> $ type sh
> sh is hashed (/bin/sh)
> 
> 
> Probably yours is different - zsh? Did you change it yourself?
> 
> If I try that I get:
> 
> $ zsh
> % type sh
> sh is /bin/sh
> % cd ~/git/lyx
> % sh autogen.sh
> Using automake (GNU automake) 1.16.2
> Using autoconf (GNU Autoconf) 2.69
> Building macros...
> Building config header template…
>> 
> No problem.
> 
> Stephan
> 
Mine is indeed zsh. After some macOS update there was an automatic 
prompt for changing to zsh. I think it is suggested because it updated 
more frequently by apple and it is the default since Catalina.

If I try bash I get

% bash

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
bash-3.2$ type sh
sh is /bin/sh
bash-3.2$ sh autogen.sh
: command not found
: command not found:
: command not found:
'utogen.sh: line 18: syntax error near unexpected token `in
'utogen.sh: line 18: `case $automake_version in


After doing the "automatic" change to zsh some time ago, I noticed that 
no commands were working anymore. So, I tried

https://stackoverflow.com/a/18428774

which seemed to have fixed the problem. I don't know whether the fact 
that I cannot run autogen.sh has anything to do with it.

Daniel



More information about the lyx-devel mailing list