Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ubuntu 18.0.4 C++ Compilation Failed SOLVED (sorta)
#1
Tongue 
Greetings everyone,

I recently setup QB64pe on an intel based chromebook running Gallium OS (Ubuntu 18.0.4 LTS) and when I try to compile a ,BAS containing the PLAY or SOUND command such as
Code: (Select All)
PLAY "egbdfa"
SOUND 2000,4
I get this:

Code: (Select All)
g++  -no-pie -std=gnu++17 -fno-strict-aliasing -Wno-conversion-null -DFREEGLUT_STATIC -I./internal/c/libqb/include -I./internal/c/parts/core/freeglut/include -I./internal/c/parts/core/glew/include -DDEPENDENCY_NO_SOCKETS -DDEPENDENCY_NO_PRINTER -DDEPENDENCY_NO_ICON -DDEPENDENCY_NO_SCREENIMAGE -DDEPENDENCY_AUDIO_MINIAUDIO internal/c/qbx.cpp -c -o internal/c/qbx.o
g++ -O3  -no-pie -std=gnu++17 -fno-strict-aliasing -Wno-conversion-null -DFREEGLUT_STATIC -I./internal/c/libqb/include -I./internal/c/parts/core/freeglut/include -I./internal/c/parts/core/glew/include -DDEPENDENCY_NO_SOCKETS -DDEPENDENCY_NO_PRINTER -DDEPENDENCY_NO_ICON -DDEPENDENCY_NO_SCREENIMAGE -DDEPENDENCY_AUDIO_MINIAUDIO -Wall internal/c/parts/audio/extras/libmidi/MIDIProcessor.cpp -c -o internal/c/parts/audio/extras/libmidi/MIDIProcessor.o
g++ -O3  -no-pie -std=gnu++17 -fno-strict-aliasing -Wno-conversion-null -DFREEGLUT_STATIC -I./internal/c/libqb/include -I./internal/c/parts/core/freeglut/include -I./internal/c/parts/core/glew/include -DDEPENDENCY_NO_SOCKETS -DDEPENDENCY_NO_PRINTER -DDEPENDENCY_NO_ICON -DDEPENDENCY_NO_SCREENIMAGE -DDEPENDENCY_AUDIO_MINIAUDIO -Wall internal/c/parts/audio/extras/libmidi/MIDIProcessorRCP.cpp -c -o internal/c/parts/audio/extras/libmidi/MIDIProcessorRCP.o
internal/c/parts/audio/extras/libmidi/MIDIProcessorRCP.cpp:10:10: fatal error: filesystem: No such file or directory
#include <filesystem>
          ^~~~~~~~~~~~
compilation terminated.
internal/c/parts/audio/extras/build.mk:55: recipe for target 'internal/c/parts/audio/extras/libmidi/MIDIProcessorRCP.o' failed
make: *** [internal/c/parts/audio/extras/libmidi/MIDIProcessorRCP.o] Error 1
make: *** Waiting for unfinished jobs....
internal/c/parts/audio/extras/libmidi/MIDIProcessor.cpp:9:10: fatal error: filesystem: No such file or directory
#include <filesystem>
          ^~~~~~~~~~~~
compilation terminated.
internal/c/parts/audio/extras/build.mk:55: recipe for target 'internal/c/parts/audio/extras/libmidi/MIDIProcessor.o' failed
make: *** [internal/c/parts/audio/extras/libmidi/MIDIProcessor.o] Error 1
 Any input at all would be most appreciated...
Reply
#2
Unfortunately this indicates your g++ version is too old. It looks like GalliumOS isn't being actively developed anymore so I'm not sure how hard it would be to get an update, but you need a version that supports C++17.

For Ubuntu 18.04 it looks like the last version of GCC on it was 7 and I believe 9 is the requirement for C++17 support, so your options are probably either building GCC yourself (not exactly easy) or finding a new distro that's still actively supported.
Reply
#3
one would think qb64 phoenix could handle such a simple program.

sadly progress must be made.  "bionic beaver" was easily seven years or more ago.  "focal fossa" which was the next lts, became eol a short time ago this year.

you might want to try the "official" qb64 instead.  especially if your computer can't handle a linux distribution.  that was put out in 2022 or later.

however if you insist on phoenix edition.  it is advised you upgrade your system to ubuntu 22.04 lts in the least.  that's still supported until springtime 2027.

this is because since about phoenix edition 3.4.  many changes were made.  especially toward images and sound.  new routines were included.  while old ones were swapped out.  i'm not sure but there was a library.  that was able to handle only wav, ogg and mp3 playback.  it was eventually left behind.  in favor of another library which supported a lot many more audio and music formats.  also supported the ability to render audio for a midi file using a soundfont.
Reply
#4
Thumbs Up 
Wow, thanks so much for the speedy replies. I've had numerous Linux distros, and even Windows 10 on this thing, but they all slow it to a crawl. Plus Gallium is so well put together and everything just works out of the box including the goofy touchpad and missing F keys.

I did however find a hokey solution. I copied MIDIProcessor.o, MIDIProcessor.cpp, MIDIProcessorRCP.cpp, and MIDIProcessorRCP.o to the QB64pe/internal/c/parts/audio/extras/libmidi/ folder from a QB64pe install on the "latest MX Linux" desktop and PLAY and SOUND are working, albeit a bit choppily. What I am going to do at this point is try to find an older version of QB64pe that might work at the cost of some of the newer features and settle on that. I'll post a final update for anyone else in my er...um...self induced predicament.

Thanks again for the replies Smile
Reply
#5
Information 
OK, last post on this for anyone else who might need it. It seems, at least on this machine, changes that occurred in version 3.14.0 are what led to the error in the original post. Version 3.13.1 went through with compilation. The other QB64 versions from 2.1 down to 1.5 worked as well.

The actual fix for QB64pe 4.2.0 on THIS machine was to copy "MIDIProcessor.o" and "MIDIProcessorRCP.o" from a WORKING installation of QB64pe 4.2.0 on another Linux machine (MX Linux 23.6). I stress working because it seems on a fresh install they are not present and are created the first time a compilation of code containing either of the PLAY or SOUND commands takes place. Also, copying the two files from version 4.2.0 on a different Windows 10 machine AND version 3.13.1 on this, the original Toshiba Chromebook 2, DID NOT work (to save someone the trouble).

The place the two files can be found in the QB64pe directory is:
(Your QB64pe Folder)/internal/c/parts/audio/extras/libmidi/

This all took place on a Toshiba Chromebook 2 (2014/ Baytrail) with Gallium OS 3.1, a specialized 64 bit Ubuntu 18.0.4 based distribution built specifically for Chromebooks. Sadly, it isn't updated anymore, but it sure is serving a purpose for me and this old unit.

Well I hope this helps someone else who might have run into this particular situation.

Thanks for the read and happy pluckin' everyone...
Reply
#6
still you might want to try to use a linux distribution.  two years or more advanced than ubuntu 18 "bionic beaver."

indeed, i have received choppy sound from mx linux.  i have a "bookworm" based example.  with "fluxbox desktop."  (not sure what 23.something it was.  i downloaded the iso a couple of months ago.)  i was forced to uninstall pipewire completely.  in favor of pulseaudio.  in order to use a windows-only application through wine.  for music creation.  however it doesn't do away with all the clicks in the audio.  but it is acceptable to me.  there was no need to do that with mx linux with kde plasma.

i wish i could tell you about persistence.  but you could install the latest qb64 phoenix on mx linux or ubuntu.  or some other linux distribution that could retain configuration.  and other settings between live log-in sessions.

what you described doing.  is fine if you only want to run programs created with microsoft quickbasic.  and earlier versions of qb64.  but you will have problems.  trying to use some newer features.  such as changing the waveform for play command.  or if you want to play an ancient tracker module.  in a game that you are creating.

also when qb64 phoenix changes the release to 4.3.  or version like 5.0.  and you decide you need something from there.  you will have to do your trick again.  compiling away from your chromebook and then patching it back.  which could get tiresome.

anyway i don't know anything about chromebook experience.
Reply
#7
Good points and I hear you, but I tried newer distros. They were just too much for it and would require serious tweaking/research/experimenting just to get things functioning. I got myself starting out in a hole of sorts. On the sound "stuttering", it's very slight only in the very beginning of program execution, and only some of the time so it's acceptable. Chromebooks are weird in the hardware department and resource limited too. Gallium solves almost all of the hardware headaches out of the box and runs slick too. I'm just getting started playing around with different languages, always gravitating back towards QBASIC, my first exposure from many years ago. I actually have QBASIC on it too in DOSBox and DOSemu, separately. Also have FreeBASIC and PICO-8. Whatever I'm in the mood for, I guess.

I'm averaging between 8 and 11 hours on a fully charged original battery from 2014, depending on what I'm doing, generating almost no heat, and nothing I do is mission critical or would require newer features. Don't really need to update and barely go online with it. All in all, it's a pretty decent little machine for tinkering, learning, and just playing around.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  TOTP 100% qb64 Yup - sorta LOL Ra7eN 11 2,016 02-12-2026, 01:04 PM
Last Post: SpriggsySpriggs
  _putimage (Solved) Pete 0 224 11-16-2025, 06:48 AM
Last Post: Pete
  After using the font, the IDE is ripe for reinstallation SOLVED! Petr 8 1,403 12-12-2024, 04:45 PM
Last Post: Petr
  [Solved] How come CLS clears more than the _DEST image here? Dav 2 770 10-07-2024, 12:14 AM
Last Post: Dav
  Old code needs fixing (problem solved) bplus 6 1,281 09-27-2024, 04:15 PM
Last Post: SMcNeill

Forum Jump:


Users browsing this thread: 1 Guest(s)