rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

wxmaxima build failure with MacPorts #811

Open rtoy opened 6 days ago

rtoy commented 6 days ago

Imported from SourceForge on 2024-07-03 11:33:44 Created by murraye on 2021-02-07 18:00:32 Original: https://sourceforge.net/p/maxima/bugs/3713


I'm following procedure at https://sourceforge.net/projects/maxima/files/Maxima-MacOS/5.44.0-MacOSX/ and in the readme.txt file there to install maxima with wxmaxima under MacPorts 2.6.99. This is under macOS BigSur 11.1 and with Xcode and Command Line Tools 12.

The build of the maxima port itself was OK. But the build of wxmaxim failed:

{{{ :info:build [ 98%] Linking CXX executable wxmaxima.app/Contents/MacOS/wxmaxima :info:build Undefined symbols for architecture x86_64: :info:build "ZThn1440_N14wxRichTextCtrl10AppendTextERK8wxString", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_N14wxRichTextCtrl10DoSetValueERK8wxStringi", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_N14wxRichTextCtrl10SelectNoneEv", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_N14wxRichTextCtrl11SetEditableEb", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_N14wxRichTextCtrl12DoSetMarginsERK7wxPoint", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_N14wxRichTextCtrl12SetSelectionEll", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_N14wxRichTextCtrl17SetInsertionPointEl", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_N14wxRichTextCtrl20SetInsertionPointEndEv", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_N14wxRichTextCtrl3CutEv", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_N14wxRichTextCtrl4CopyEv", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_N14wxRichTextCtrl4RedoEv", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_N14wxRichTextCtrl4UndoEv", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_N14wxRichTextCtrl5PasteEv", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_N14wxRichTextCtrl6RemoveEll", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_N14wxRichTextCtrl7ReplaceEllRK8wxString", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_N14wxRichTextCtrl9WriteTextERK8wxString", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_NK14wxRichTextCtrl10DoGetValueEv", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_NK14wxRichTextCtrl10IsEditableEv", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_NK14wxRichTextCtrl12DoGetMarginsEv", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440NK14wxRichTextCtrl12GetSelectionEPlS0", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_NK14wxRichTextCtrl15GetLastPositionEv", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_NK14wxRichTextCtrl17GetInsertionPointEv", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_NK14wxRichTextCtrl18GetStringSelectionEv", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_NK14wxRichTextCtrl6CanCutEv", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_NK14wxRichTextCtrl7CanCopyEv", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_NK14wxRichTextCtrl7CanRedoEv", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_NK14wxRichTextCtrl7CanUndoEv", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_NK14wxRichTextCtrl8CanPasteEv", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1440_NK14wxRichTextCtrl8GetRangeEll", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn1504_N10wxTextCtrl3CutEv", referenced from: :info:build ZTV9BTextCtrl in BTextCtrl.cpp.o :info:build "ZThn1504_N10wxTextCtrl4CopyEv", referenced from: :info:build ZTV9BTextCtrl in BTextCtrl.cpp.o :info:build "ZThn1504_N10wxTextCtrl5PasteEv", referenced from: :info:build ZTV9BTextCtrl in BTextCtrl.cpp.o :info:build "ZThn1504_N14wxTextCtrlBase7SetHintERK8wxString", referenced from: :info:build ZTV9BTextCtrl in BTextCtrl.cpp.o :info:build "ZThn808_N6wxGrid31GetSizeAvailableForScrollTargetERK6wxSize", referenced from: :info:build ZTV13Variablespane in VariablesPane.cpp.o :info:build "ZThn824_N14wxRichTextCtrl10DoLoadFileERK8wxStringi", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn824_N14wxRichTextCtrl10DoSaveFileERK8wxStringi", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn824_N14wxRichTextCtrl12DiscardEditsEv", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn824_N14wxRichTextCtrl12ShowPositionEl", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn824_N14wxRichTextCtrl15SetDefaultStyleERK10wxTextAttr", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn824_N14wxRichTextCtrl8GetStyleElR10wxTextAttr", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn824_N14wxRichTextCtrl8SetStyleEllRK10wxTextAttr", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn824_N14wxRichTextCtrl9MarkDirtyEv", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn824_N14wxTextCtrlBase8overflowEi", referenced from: :info:build ZTV9BTextCtrl in BTextCtrl.cpp.o :info:build "ZThn824_NK14wxRichTextCtrl10IsModifiedEv", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn824_NK14wxRichTextCtrl11GetLineTextEl", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn824NK14wxRichTextCtrl12PositionToXYElPlS0", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn824_NK14wxRichTextCtrl12XYToPositionEll", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn824_NK14wxRichTextCtrl13GetLineLengthEl", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn824_NK14wxRichTextCtrl16GetNumberOfLinesEv", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn824_NK14wxRichTextCtrl7HitTestERK7wxPointPl", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn824NK14wxRichTextCtrl7HitTestERK7wxPointPlS3", referenced from: :info:build ZTV12XmlInspector in XmlInspector.cpp.o :info:build "ZThn888_N10wxTextCtrl12DiscardEditsEv", referenced from: :info:build ZTV9BTextCtrl in BTextCtrl.cpp.o :info:build "ZThn888_N10wxTextCtrl12ShowPositionEl", referenced from: :info:build ZTV9BTextCtrl in BTextCtrl.cpp.o :info:build "ZThn888_N10wxTextCtrl15SetDefaultStyleERK10wxTextAttr", referenced from: :info:build ZTV9BTextCtrl in BTextCtrl.cpp.o :info:build "ZThn888_N10wxTextCtrl8GetStyleElR10wxTextAttr", referenced from: :info:build ZTV9BTextCtrl in BTextCtrl.cpp.o :info:build "ZThn888_N10wxTextCtrl8SetStyleEllRK10wxTextAttr", referenced from: :info:build ZTV9BTextCtrl in BTextCtrl.cpp.o :info:build "ZThn888_N10wxTextCtrl9MarkDirtyEv", referenced from: :info:build ZTV9BTextCtrl in BTextCtrl.cpp.o :info:build "ZThn888_NK10wxTextCtrl10IsModifiedEv", referenced from: :info:build ZTV9BTextCtrl in BTextCtrl.cpp.o :info:build "ZThn888_NK10wxTextCtrl11GetLineTextEl", referenced from: :info:build ZTV9BTextCtrl in BTextCtrl.cpp.o :info:build "ZThn888NK10wxTextCtrl12PositionToXYElPlS0", referenced from: :info:build ZTV9BTextCtrl in BTextCtrl.cpp.o :info:build "ZThn888_NK10wxTextCtrl12XYToPositionEll", referenced from: :info:build ZTV9BTextCtrl in BTextCtrl.cpp.o :info:build "ZThn888_NK10wxTextCtrl13GetLineLengthEl", referenced from: :info:build ZTV9BTextCtrl in BTextCtrl.cpp.o :info:build "ZThn888_NK10wxTextCtrl16GetNumberOfLinesEv", referenced from: :info:build ZTV9BTextCtrl in BTextCtrl.cpp.o :info:build "ZThn936_N17wxGenericListCtrl31GetSizeAvailableForScrollTargetERK6wxSize", referenced from: :info:build ZTV17AutocompletePopup in AutocompletePopup.cpp.o :info:build "ZlsRSoRK8wxString", referenced from: :info:build ZN15ErrorRedirector11DoLogRecordEmRK8wxStringRK15wxLogRecordInfo in ErrorRedirector.cpp.o :info:build ZN5MyApp6OnInitEv in main.cpp.o :info:build ZN8wxMaxima23TryToReadDataFromMaximaEv in wxMaxima.cpp.o :info:build __ZN8wxMaxima10ReadStdErrEv in wxMaxima.cpp.o :info:build ld: symbol(s) not found for architecture x86_64 :info:build collect2: error: ld returned 1 exit status :info:build gmake[2]: [src/CMakeFiles/wxmaxima.dir/build.make:1866: src/wxmaxima.app/Contents/MacOS/wxmaxima] Error 1 :info:build gmake[1]: [CMakeFiles/Makefile2:2504: src/CMakeFiles/wxmaxima.dir/all] Error 2 :info:build gmake: *** [Makefile:182: all] Error 2 :info:build Command failed: cmake --build . :info:build Exit code: 2 :error:build Failed to build wxMaxima: command execution failed }}}

The full main.log is attached.

Attachments:

rtoy commented 6 days ago

Imported from SourceForge on 2024-07-03 11:33:45 Created by murraye on 2021-02-08 20:49:04 Original: https://sourceforge.net/p/maxima/bugs/3713/#117b/f602


I do not know how to "use Apple-Clang instead of gcc10": as I reported, I'm using MacPorts, and the way to install the wxmaxima port is simply to execute: "sudo port install wxmaxima"; MacPorts infrastructure is supposed to take case of the rest. So the port as posted at the sourceforge page I originally cited needs some kind of revision.

rtoy commented 6 days ago

Imported from SourceForge on 2024-07-03 11:33:48 Created by tomio-arisaka on 2021-02-09 13:20:09 Original: https://sourceforge.net/p/maxima/bugs/3713/#da5e


I mean that Apple-Clang is the command 'clang' included in Xcode.

MacPorts can install multiple versions of software (e.g. gcc, perl, python). Each of the executable file names is different in order to avoid the conflict. Then it is useful that one of the versions is selected as default. The command "port select" is the mechanism for it.

So I think that the command "sudo port select --set gcc none" works for you. After that, clang is used instead of gcc10 to build wxmaxima.

The following example is a description of this command:

(0) The command "port help" shows the user action "port select":

   select
       For a given group, selects a version to be the default by creating
       appropriate symbolic links. For instance, python might be linked to
       python2.6. Available select groups are installed as subdirectories
       of ${prefix}/etc/select/ and can be listed using --summary. To list
       the available versions in a group, use --list. To see which version
       is currently selected for a group, use --show. To change the
       selected version for a group, use --set.

       For example:

           port select --summary
           port select --show python
           port select --list python
           port select --set python python34

(1) After installing gcc10

If you want to check the currently selected version, the following commands are available.

$ port select --summary
Name       Selected  Options
====       ========  =======
gcc        none      mp-gcc10 none
llvm       none      mp-llvm-10 mp-llvm-9.0 none
python     none      python27 python27-apple python36 python37 python38 none
python2    none      python27 python27-apple none
python3    none      python36 python37 python38 none
wxWidgets  none      wxWidgets-3.0 wxWidgets-3.2 none
$ 
$ port select --show gcc
The currently selected version for 'gcc' is 'none'.
$ 
$ port select --list gcc
Available versions for gcc:
    mp-gcc10
    none (active)
$ 

(2) Set gcc10 as default gcc

$ sudo port select --set gcc mp-gcc10
Password:
Selecting 'mp-gcc10' for 'gcc' succeeded. 'mp-gcc10' is now active.
$ 

If you want to check the currently selected version, the following commands are available.

$ port select --summary
Name       Selected  Options
====       ========  =======
gcc        mp-gcc10  mp-gcc10 none
llvm       none      mp-llvm-10 mp-llvm-9.0 none
python     none      python27 python27-apple python36 python37 python38 none
python2    none      python27 python27-apple none
python3    none      python36 python37 python38 none
wxWidgets  none      wxWidgets-3.0 wxWidgets-3.2 none
$ 
$ port select --show gcc
The currently selected version for 'gcc' is 'mp-gcc10'.
$ 
$ port select --list gcc
Available versions for gcc:
    mp-gcc10 (active)
    none
$ 

The symbolic-links to gcc are created:

$ ls -lt /opt/local/bin/ | head
total 140696
lrwxr-xr-x    1 root  wheel        24  2  9 17:30 cpp -> /opt/local/bin/cpp-mp-10
lrwxr-xr-x    1 root  wheel        24  2  9 17:30 g++ -> /opt/local/bin/g++-mp-10
lrwxr-xr-x    1 root  wheel        24  2  9 17:30 gcc -> /opt/local/bin/gcc-mp-10
lrwxr-xr-x    1 root  wheel        25  2  9 17:30 gcov -> /opt/local/bin/gcov-mp-10
lrwxr-xr-x    1 root  wheel        29  2  9 17:30 gfortran -> /opt/local/bin/gfortran-mp-10
-rwxr-xr-x    1 root  wheel     91500  2  3 20:50 rlwrap
-rwxr-xr-x    1 root  wheel      1170  2  2 03:43 rmaxima
-rwxr-xr-x    1 root  wheel    490597  2  2 03:42 xmaxima
-rwxr-xr-x    1 root  wheel      9713  2  2 03:42 maxima
$ 
$ which cpp g++ gcc gcov gfortran
/opt/local/bin/cpp
/opt/local/bin/g++
/opt/local/bin/gcc
/opt/local/bin/gcov
/opt/local/bin/gfortran
$ 

(3) Set none as default gcc

$ sudo port select --set gcc none
Password:
Selecting 'none' for 'gcc' succeeded. 'none' is now active.
$ 
$ port select --summary
Name       Selected  Options
====       ========  =======
gcc        none      mp-gcc10 none
llvm       none      mp-llvm-10 mp-llvm-9.0 none
python     none      python27 python27-apple python36 python37 python38 none
python2    none      python27 python27-apple none
python3    none      python36 python37 python38 none
wxWidgets  none      wxWidgets-3.0 wxWidgets-3.2 none
$ 
$ port select --show gcc
The currently selected version for 'gcc' is 'none'.
$ 
$ port select --list gcc
Available versions for gcc:
    mp-gcc10
    none (active)
$ 

The symbolic-links to gcc are removed:

$ ls -lt /opt/local/bin/ | head
total 140656
-rwxr-xr-x    1 root  wheel     91500  2  3 20:50 rlwrap
-rwxr-xr-x    1 root  wheel      1170  2  2 03:43 rmaxima
-rwxr-xr-x    1 root  wheel    490597  2  2 03:42 xmaxima
-rwxr-xr-x    1 root  wheel      9713  2  2 03:42 maxima
-rwxr-xr-x    1 root  wheel    336928  2  2 03:34 sbcl
-rwxr-xr-x    1 root  wheel      9172  2  2 02:31 ecl
-rwxr-xr-x    1 root  wheel       699  2  2 02:31 ecl-config
-rwxr-xr-x    1 root  wheel     25828  2  2 02:08 annotate
-rwxr-xr-x    1 root  wheel      3997  2  2 02:08 bdftogd
$ 
$ which cpp g++ gcc gcov gfortran
/usr/bin/cpp
/usr/bin/g++
/usr/bin/gcc
/usr/bin/gcov
$ 
rtoy commented 6 days ago

Imported from SourceForge on 2024-07-03 11:33:52 Created by robert_dodier on 2021-02-27 20:56:46 Original: https://sourceforge.net/p/maxima/bugs/3713/#54c0


Hi Tomio, maybe you can you update the instructions for the MacPorts installation to say that one must use clang instead of gcc.