Problems compiling OpenMSX 17 from source in Linux. charconv missing?

بواسطة Skyblasc

Expert (102)

صورة Skyblasc

29-08-2021, 11:54

I'm trying to compile OpenMSX 17 from source in Kubuntu 18.04 ( from Ubuntu official repositories in stable last version available is 15)

After installing documented dependencies, this is the result of ./configure:

Using Python: python3
Probing target system...
Updating derived/x86_64-linux-opt/config/
Up to date: derived/x86_64-linux-opt/config/systemfuncs.hh

Found libraries:
  ALSA:             version 1.1.3
  GLEW:             version unknown
  libogg:           version unknown
  libpng:           version 1.6.34
  libtheora:        version unknown
  libvorbis:        version unknown
  OpenGL:           version 4.6
  SDL2:             version 2.0.8
  SDL2_ttf:         version 2.0.14
  Tcl:              version 8.6.8
  zlib:             version 1.2.11

Components overview:
  Emulation core:   yes
  GL renderer:      yes
  Laserdisc:        yes
  ALSA MIDI:        yes

Customisable options:
  Install to        /opt/openMSX
  (you can edit these in build/

All required and optional components can be built.

If the detected libraries differ from what you think is installed on this system, please check the log file: derived/x86_64-linux-opt/config/probe.log

Then, when trying to compile with make this happens:

Using Python: python3
Creating derived/x86_64-linux-opt/config/
Using Python: python3
Build configuration:
  Platform: x86_64-linux
  Flavour:  opt
  Compiler: g++
  Subset:   full build
Creating derived/x86_64-linux-opt/config/Version.ii...
Creating derived/x86_64-linux-opt/config/build-info.hh...
Creating derived/x86_64-linux-opt/config/components.hh...
In file included from src/settings/Setting.hh:8:0,
                 from src/settings/IntegerSetting.hh:4,
                 from src/Autofire.hh:7,
                 from src/
src/utils/StringOp.hh:7:10: fatal error: charconv: The file or directory doesn't exists
compilation terminated.
build/ recipe for target 'derived/x86_64-linux-opt/obj/' failed
make: *** [derived/x86_64-linux-opt/obj/] Error 1

I've been investigating and it seems that charconv is part of the strings library of C++ compilers, so i don't know what can be missing because it should be included with the g++ installation, doesn't? My version of make is 4.1 and versions of g++ is 8.4 ( but I'm not sure what versions is used because I've several versions installed ( 4:7.4 , 7.5.3 and 8.4) but I assume the newest one is the version used).
BTW, this is a copy of the configure log Probe.log

Probing system:
Compiler works: g++ -m64 (LC_ALL=C.UTF-8)
Found function: ftruncate
Found function: mmap
Found function: posix_memalign
Found function: nftw
ALSA: Found header
ALSA: Found lib
GL: Found header
GL: Found lib
GLEW: Found header
GLEW: Found lib
OGG: Found header
OGG: Found lib
PNG: Found header
PNG: Found lib
SDL2: Found header
SDL2: Found lib
SDL2_TTF: Found header
SDL2_TTF: Found lib
TCL: Found header
TCL: Found lib
THEORA: Found header
THEORA: Found lib
VORBIS: Found header
VORBIS: Found lib
ZLIB: Found header
ZLIB: Found lib

I'm missing something?

Thank you!

Login أوregister لوضع تعليقاتك

بواسطة Manuel

Ascended (19678)

صورة Manuel

29-08-2021, 13:15

Try this command to know which g++ is used (you need 8 or higher): g++ --version

بواسطة Daemos

Prophet (2169)

صورة Daemos

29-08-2021, 15:02

Had the same problem do as manuel says and if your version is indeed not 8 install 8 then run

$sudo update-alternatives --config gcc

and for g++
$sudo update-alternatives --config g++

Pick 8 and you are good to go. Be careful not to rebuild your kernel with the wrong version or things may go wrong Wink
don't forget to check the version after doing that.

بواسطة Skyblasc

Expert (102)

صورة Skyblasc

29-08-2021, 15:38

Hi @Manuel and @Daemos, thanks for your help. I'm compiling just now Smile
If anyone has the same issue, I explain how has been solved.
I had gcc 8 and g++ 8 already installed but when using the command suggested by Manuel to confirm the version used by the system, it was 7 not 8.
The command to select gcc version pointed by Deamos didn't worked. The result was "Error, no alternatives present for gcc" The same for g++, but it was the clue that I needed Wink It results that I HAD TO MANUALLY "install" the alternatives available ( it was not done automatically with the update-alternatives command.)

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 8
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 8

That made version 8 the automatically default, but also made version 8 available to be selected by the command update-alternatives --config gcc

Now if issued this command I can choose the version I want when before ( even with version 8 already installed) it gave me no choices:

$ sudo update-alternatives --config g++
There are 2 choices for the alternative g++ (providing /usr/bin/g++).

  Selection    Path            Priority   Status
 * 0            /usr/bin/g++-8   8         auto mode
  1            /usr/bin/g++-7   7         manual mode
  2            /usr/bin/g++-8   8         manual mode

Press  to keep the current choice[*], or type selection number:

Now my system is using g++-8 and gcc-8 by default and the compiling is under way!

Thank you!

بواسطة Daemos

Prophet (2169)

صورة Daemos

29-08-2021, 16:18

Smile Smile Smile Smile Indeed forgot about the --install part you mentioned. Glad you figured it out. Happy compiling. Youre welcome.