[go: up one dir, main page]

Menu

#210 Multiple issues on Arch Linux with gcc 11.2

open
nobody
None
5
2023-01-11
2022-04-03
No

I encountered multiple issues when trying to build Scidb on my ArchLinux desktop
I eventually got a clean build; attached are patches and a script to apply them.

Here are the problems I encountered

  1. configure script did not understand the double digit version number of gcc (11.2); patch file provided. Patch sets minimum version to be 10.0
  2. needed to set CFLAGS and CXXFLAGS (on configure) to include -fcommon because, since v10, gcc and friends no longer tolerate "Multiple Definitions" i.e. a definition in a header file included by several source files. The primary offender was in src/tk/tcl8.6/tclInt.h but there may be others. Using the compiler switch -fcommon reverts to previous behaviour tolerating multiple defines. These flags can be passed as environment variables to the configure script. This is a workaround only - a proper fix will be quite extensive
  3. src/sys/sys_info.cpp includes a non-existent header (see Issue #209). Patch file provided
  4. the Makefile for the Sjeng engine also needs the -fcommon switch. Patch file provided
  5. src/dump_eco.cpp has a broken line 116. Patch file provided.; patch changes an error message. This is not essential as the echo binary is provided anyway. There are also a few errors in the source for the eco file - provided in a following ticket

After applying these patches, the following command sequence

export CFLAGS="-fcommon" CXXFLAGS="-fcommon"; ./configure
make clean
make
sudo make install

provides a clean install on ArchLinux; I will try and resurrect the AUR package

For the attached script and patches, download them all to your Scidb source tree and run the (bash) script

5 Attachments

Related

Bugs: #213

Discussion

  • Drew Ferguson

    Drew Ferguson - 2022-04-05

    A working deployment is available again for ArchLinux in AUR

     
    👍
    1
  • zugzuang

    zugzuang - 2022-04-24

    I was super happy that you brought this wonderful program to the year 2022. But unfortunately it continues to give me an error. I tried to install with pamac-manager and with yay both through Manjaro. I'm using the most current version of Manjaro kernel 5.17.1-3. make: (*** [Makefile:20: all] Error 2
    ==> ERRO: A failure occurred in build().
       Aborting...
    -> error when building: scidb-svn) But I do not lose hope, one day I will install this amazing program, on an updated version of Arch Linux. Congratulations for the excellent work.

     
    • Bogdan B

      Bogdan B - 2022-04-25

      zugzuang: please try to post a more detailed error text (if needed, re-run make in verbose mode): make VERBOSE=1

       
  • zugzuang

    zugzuang - 2022-04-25

    make VERBOSE=1
    make[1]: 'scidb-beta.1.gz' está atualizado.
    Compiling cql/cql_match.cpp [-fcommon -g -I/usr/include -DSCI_NAMEBASE_FIX=1]
    In file included from ../mstl/m_memblock.h:71,
    from ../mstl/m_vector.h:24,
    from cql/cql_match.h:34,
    from cql/cql_match.cpp:27:
    ../mstl/m_memblock.ipp: In member function ‘mstl::memblock& mstl::memblock<t>::operator=(mstl::memblock<t>&&)’:
    ../mstl/m_memblock.ipp:134:27: error: invalid use of incomplete type ‘class mstl::memblock<t>’
    134 | memblock::~memblock();
    | ^~~~~~~~~
    In file included from ../mstl/m_vector.h:24,
    from cql/cql_match.h:34,
    from cql/cql_match.cpp:27:
    ../mstl/m_memblock.h:27:7: note: declaration of ‘class mstl::memblock<t>’
    27 | class memblock
    | ^~~~~~~~
    make[2]: *** [Makefile:162: cql/cql_match.o] Erro 1
    make[1]: *** [Makefile:205: recursive] Erro 1
    make: *** [Makefile:20: all] Erro 2</t></t></t></t>

     

    Last edit: zugzuang 2022-04-25
  • Drew Ferguson

    Drew Ferguson - 2022-04-25

    zuguang: sorry I cannot replicate your behaviour

    However, line 134 in src/mstl/m_memblock.ipp is a condition skipping the line reported above

    Do you have a recent source code checkout?

    Does your code have the following at line 134?

    #if 0 // NOTE: since compiler version 8.1 this is not compiling anymore
                    memblock::~memblock();
    #else
                    this->memblock::~memblock();
    #endif
    
    1. if you do not - your codebase is not current
    2. if you do, I don't know why the condition is not being triggered - you could try replacing the whole test block with the line
                    this->memblock::~memblock();
    

    and try to make again

     
    👍
    1
  • zugzuang

    zugzuang - 2022-04-25

    Thank you very much, it worked! Installation finished without errors. As soon as I have some free time I will finally use this excellent program on an updated 2022 linux distro. Thank you very much.

     
  • Roland Chastain

    Roland Chastain - 2023-01-06

    @Drew Ferguson

    Thank you very much. By applying your patches, I could build the application on Linux Mageia.

    By the way, is it possible to run the application without installing it?

    If I do this:

    [roland@localhost src]$ ./tkscidb-beta
    

    I get only a little blank window.

     

    Last edit: Roland Chastain 2023-01-06
    • Drew Ferguson

      Drew Ferguson - 2023-01-06

      The name of the binary is scidb-beta; it is in the tcl tree of your source .
      It may not function fully though as some components (such as the engines, graphics and other things) get installed in /usr/bin and below /usr/share

      If you do install it, there is an uninstall function should remove everything; run it from the top of your source tree
      sudo make uninstall

       
      👍
      1

      Last edit: Drew Ferguson 2023-01-06
      • Roland Chastain

        Roland Chastain - 2023-01-11

        Thank you for your answer. Indeed it didn't even start when I tried to run it without installing, but after installation it works well.

         

Log in to post a comment.