Page 1 of 1
C++ compiler?
Posted: Sat Aug 05, 2023 9:49 am
by thomasl
Not sure whether this is by design or by omission but the MX23 xfce I've installed has no C++ compiler on board (C is fine). It's not hard to install but I'd have thought this compiler comes as standard these days?!
Re: C++ compiler?
Posted: Sat Aug 05, 2023 10:32 am
by Adrian
Just install build-essential if you need to build something. It's not on the ISO because it's not a dependency to any of the stuff that's there and not everybody compiles stuff and in general people who know how to compile stuff know how to install the compiler, it's really not hard, it takes a minute. If you really like it on the ISO, install it, take a snapshot and it will always be there.
Re: C++ compiler?
Posted: Sat Aug 05, 2023 10:45 am
by thomasl
@Adrian That's right, it was just that a couple of things which under MX19 used to work OOTB didn't anymore and the last thing I'd looked for was a missing C++ compiler
I also find it somewhat ironic that MX23 as it's installed can't compile its own (or at least some of its own) tools... actually that was one reason why I didn't even think about the C++ compiler.
Re: C++ compiler?
Posted: Sat Aug 05, 2023 11:39 am
by Stevo
You might report that as a bug, since we do want users to be able to build their own wi-fi driver from source if it comes down to that as a last resort to get a connection.
Re: C++ compiler?
Posted: Sat Aug 05, 2023 1:14 pm
by thomasl
@Stevo Hm... I don't know enough about those drivers to say whether a C++ compiler would ever be required to compile any of them.
(As an aside: I used to have to compile a driver for the Realtek rtl8821ce wifi for MX19. This very same driver is also still included in MX23... but it's not needed anymore as the MX23 kernel now has the required modules. I've removed it without probs.)
Re: C++ compiler?
Posted: Sat Aug 05, 2023 4:09 pm
by Stevo
The build-essential package does install C, C++, and whatever else gcc supports.
Re: C++ compiler?
Posted: Tue Nov 07, 2023 6:36 pm
by WyCKyD
Stevo wrote: Sat Aug 05, 2023 11:39 am
You might report that as a bug, since we do want users to be able to build their own wi-fi driver from source if it comes down to that as a last resort to get a connection.
I am in that exact situation now. (Writing this from another computer with internet access) After having upgraded from MX 21.3 to MX 23 (and later 23.1) I started having issues with the system. I decided to do a fresh clean install from a MX23.1 bootable usb drive, knowing that I would have to reinstall the wifi device driver, it's an AC1200 (Techkey) and worked on all previous versions of MX that I have been using. However, when I try to install the driver I get an error that gcc isn't installed and therefore can't continue. I love the fact that this wifi adapter works well with linux.
Could somebody please tell me how to install build-essential offline, so that I can get this computer running with internet once again?
Thank you in advance, because I know we have a great community that someone might just know the solution.

Re: C++ compiler?
Posted: Tue Nov 07, 2023 8:14 pm
by Stevo
These are workarounds...the AC1200 rtl8822bu chipset is supposed to be supported by 6.2 and up kernels, along with a newer firmware-realtek in our AHS, so you may be able to download the deb and install one of our newer Liquorix kernels:
https://mxrepo.com/mx/repo/pool/ahs/l/linux-liquorix/
and firmware-realtek:
https://mxrepo.com/mx/repo/pool/ahs/f/firmware-nonfree/
Our AHS edition with a newer kernel should hopefully just work in a live session.
Or...a smartphone can be tethered to a MX install via a USB cable, and either access the repos via the cell network or having the phone sign on to your own wi-fi network.
Re: C++ compiler?
Posted: Tue Nov 07, 2023 8:29 pm
by WyCKyD
I will try that and let you know the results.
Thank you for the quick response.
P.S. Do I just download the 6.2 header and image file and run dpkg?
Downloaded the 6.2 header and image file and I ran dpkg. First, the image file...no issues. Next, the header file...linux-headers-6.2.14-1-liquorix-amd64 depends on gcc; however:
Package gcc is not installed.
Is there an image with a 6.2 kernel that I can download and write to a thumb drive?
Re: C++ compiler?
Posted: Tue Nov 07, 2023 11:00 pm
by Stevo
Just use the MX deb installer, not dpkg.. We have a custom action built into Thunar that should show this option if you right-click on a deb. If it's missing, I think we have a separate app that you can search for in the menu.
You only need the headers if you're going to compile something. Since the new internal kernel wi-fi driver is already compiled, you can install them later after wi-fi is working. Don't forget the updated firmware.
Is there an image with a 6.2 kernel that I can download and write to a thumb drive?
That would be the ISO of our AHS version I mentioned. You really don't
need all the other updates on it, but they're supposed to also work fine on older hardware.
Re: C++ compiler?
Posted: Wed Nov 08, 2023 3:24 am
by operadude
Adrian wrote: Sat Aug 05, 2023 10:32 am
Just install build-essential if you need to build something. It's not on the ISO because it's not a dependency to any of the stuff that's there and not everybody compiles stuff and in general people who know how to compile stuff know how to install the compiler, it's really not hard, it takes a minute. If you really like it on the ISO, install it, take a snapshot and it will always be there.
Thanks for that!
I was also wondering why my C++ "Hello, World!" program was not working on MX-23, then I did this:
Code: Select all
$ which g++
opera-dude@GA-H270-HD3:~
$ apt policy g++
g++:
Installed: (none)
Candidate: 4:12.2.0-3
Version table:
4:12.2.0-3 500
500 http://deb.debian.org/debian bookworm/main amd64 Packages
Questions:
For a learning C++, does one need "build-essential"?
And if only concerned about running C++ programs, does this suffice? :
Code: Select all
$ sudo apt install g++
[sudo] password for opera-dude:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
g++-12 libstdc++-12-dev
Suggested packages:
g++-multilib g++-12-multilib gcc-12-doc libstdc++-12-doc
And if so, should one also install the suggested:
?
Re: C++ compiler?
Posted: Wed Nov 08, 2023 9:54 am
by Stevo
build-essential will also install and configure essential tools, such as "make".
You don't need multilib packages unless you plan to cross-compile.
Re: C++ compiler?
Posted: Wed Nov 08, 2023 12:27 pm
by WyCKyD
Here is some info about the computer that I am speaking about. Still not able to install the wifi driver because gcc isn't installed.
First, the system info:
Code: Select all
System:
Kernel: 6.2.14-1-liquorix-amd64 [6.2-23~mx23+1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0 parameters: audit=0
intel_pstate=disable hpet=disable rcupdate.rcu_expedited=1
BOOT_IMAGE=/boot/vmlinuz-6.2.14-1-liquorix-amd64 root=UUID=<filter> ro quiet splash
Desktop: KDE Plasma v: 5.27.5 wm: kwin_x11 vt: 7 dm: SDDM Distro: MX-23.1_KDE_x64 Libretto
October 15 2023 base: Debian GNU/Linux 12 (bookworm)
Machine:
Type: Desktop Mobo: ASRock model: B365M Pro4 serial: <superuser required>
UEFI: American Megatrends v: P4.50 date: 07/30/2021
CPU:
Info: model: Intel Core i3-8100 bits: 64 type: MCP arch: Coffee Lake gen: core 8 level: v3
note: check built: 2018 process: Intel 14nm family: 6 model-id: 0x9E (158) stepping: 0xB (11)
microcode: 0xF4
Topology: cpus: 1x cores: 4 smt: <unsupported> cache: L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB
L2: 1024 KiB desc: 4x256 KiB L3: 6 MiB desc: 1x6 MiB
Speed (MHz): avg: 800 min/max: 800/3600 scaling: driver: acpi-cpufreq governor: ondemand cores:
1: 800 2: 800 3: 800 4: 800 bogomips: 28800
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities:
Type: itlb_multihit status: KVM: VMX disabled
Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT disabled
Type: mds mitigation: Clear CPU buffers; SMT disabled
Type: meltdown mitigation: PTI
Type: mmio_stale_data mitigation: Clear CPU buffers; SMT disabled
Type: retbleed mitigation: IBRS
Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: IBRS, IBPB: conditional, STIBP: disabled, RSB filling,
PBRSB-eIBRS: Not affected
Type: srbds mitigation: Microcode
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: NVIDIA GP107 [GeForce GTX 1050 Ti] vendor: Gigabyte driver: nouveau v: kernel
non-free: 530.xx+ status: current (as of 2023-03) arch: Pascal code: GP10x process: TSMC 16nm
built: 2016-21 pcie: gen: 1 speed: 2.5 GT/s lanes: 16 link-max: gen: 3 speed: 8 GT/s ports:
active: HDMI-A-1 empty: DP-1, DVI-D-1, HDMI-A-2, HDMI-A-3 bus-ID: 01:00.0 chip-ID: 10de:1c82
class-ID: 0300 temp: 33.0 C
Device-2: Logitech Webcam C270 type: USB driver: snd-usb-audio,uvcvideo bus-ID: 1-3:2
chip-ID: 046d:0825 class-ID: 0102 serial: <filter>
Device-3: Sonix USB Camera type: USB driver: snd-usb-audio,uvcvideo bus-ID: 1-4:3
chip-ID: 0c49:636b class-ID: 0102 serial: <filter>
Display: x11 server: X.Org v: 1.21.1.7 with: Xwayland v: 22.1.9 compositor: kwin_x11 driver: X:
loaded: modesetting unloaded: fbdev,vesa dri: nouveau gpu: nouveau display-ID: :0 screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22") s-diag: 582mm (22.93")
Monitor-1: HDMI-A-1 mapped: HDMI-1 model: Dell S2240T serial: <filter> built: 2013
res: 1920x1080 hz: 60 dpi: 102 gamma: 1.2 size: 477x268mm (18.78x10.55") diag: 547mm (21.5")
ratio: 16:9 modes: max: 1920x1080 min: 720x400
API: OpenGL v: 4.3 Mesa 23.1.2-1~mx23ahs renderer: NV137 direct-render: Yes
Audio:
Device-1: Intel 200 Series PCH HD Audio vendor: ASRock driver: snd_hda_intel bus-ID: 1-3:2
v: kernel chip-ID: 046d:0825 alternate: snd_soc_avs bus-ID: 00:1f.3 class-ID: 0102
chip-ID: 8086:a2f0 serial: <filter> class-ID: 0403
Device-2: NVIDIA GP107GL High Definition Audio vendor: Gigabyte driver: snd_hda_intel v: kernel
pcie: gen: 1 speed: 2.5 GT/s lanes: 16 link-max: gen: 3 speed: 8 GT/s bus-ID: 01:00.1
chip-ID: 10de:0fb9 class-ID: 0403
Device-3: Logitech Webcam C270 type: USB driver: snd-usb-audio,uvcvideo
Device-4: Sonix USB Camera type: USB driver: snd-usb-audio,uvcvideo bus-ID: 1-4:3
chip-ID: 0c49:636b class-ID: 0102 serial: <filter>
Device-5: C-Media Blue Snowball type: USB driver: hid-generic,snd-usb-audio,usbhid
bus-ID: 1-8:4 chip-ID: 0d8c:0005 class-ID: 0300 serial: <filter>
API: ALSA v: k6.2.14-1-liquorix-amd64 status: kernel-api tools: alsamixer,amixer
Server-1: PipeWire v: 0.3.65 status: active with: 1: pipewire-pulse status: active
2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
tools: pactl,pw-cat,pw-cli,wpctl
Network:
Device-1: Intel Ethernet I219-V vendor: ASRock driver: e1000e v: kernel port: N/A bus-ID: 00:1f.6
chip-ID: 8086:15b8 class-ID: 0200
IF: eth0 state: down mac: <filter>
Drives:
Local Storage: total: 1.93 TiB used: 23.84 GiB (1.2%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: Seagate model: ST2000DM008-2FR102 size: 1.82 TiB
block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 7200 serial: <filter>
rev: 0001 scheme: GPT
ID-2: /dev/sdb maj-min: 8:16 type: USB model: USB DISK 3.0 size: 115.36 GiB block-size:
physical: 512 B logical: 512 B type: N/A serial: <filter> rev: PMAP scheme: MBR
SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
ID-1: / raw-size: 1.82 TiB size: 1.79 TiB (98.37%) used: 14.28 GiB (0.8%) fs: ext4 dev: /dev/sda2
maj-min: 8:2
ID-2: /boot/efi raw-size: 256 MiB size: 252 MiB (98.46%) used: 274 KiB (0.1%) fs: vfat
dev: /dev/sda1 maj-min: 8:1
Swap:
Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: file size: 6 GiB used: 0 KiB (0.0%) priority: -2 file: /swap/swap
Sensors:
System Temperatures: cpu: 29.0 C mobo: N/A gpu: nouveau temp: 33.0 C
Fan Speeds (RPM): N/A gpu: nouveau fan: 0
Repos:
Packages: pm: dpkg pkgs: 2423 libs: 1331 tools: apt,apt-get,aptitude,nala pm: rpm pkgs: 0
pm: flatpak pkgs: 0
No active apt repos in: /etc/apt/sources.list
Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
Active apt repos in: /etc/apt/sources.list.d/debian.list
1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
Active apt repos in: /etc/apt/sources.list.d/mx.list
1: deb http://mirrors.rit.edu/mxlinux/mx-packages/mx/repo/ bookworm main non-free
2: deb http://mirrors.rit.edu/mxlinux/mx-packages/mx/repo/ bookworm ahs
Info:
Processes: 207 Uptime: 9m wakeups: 1 Memory: 31.27 GiB used: 1.22 GiB (3.9%) Init: SysVinit
v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12 Client: shell wrapper
v: 5.2.15-release inxi: 3.3.26
Boot Mode: UEFI
Second, is the output of lsusb:
Code: Select all
wyckyd@ucs:~
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0d8c:0005 C-Media Electronics, Inc. Blue Snowball
Bus 001 Device 008: ID 6557:1631 Emtec USB DISK 3.0
Bus 001 Device 003: ID 0c49:636b Sonix Technology Co., Ltd. USB Camera
Bus 001 Device 002: ID 046d:0825 Logitech, Inc. Webcam C270
Bus 001 Device 007: ID 30fa:0400 USB OPTICAL MOUSE
Bus 001 Device 006: ID c0f4:07c0 USB usb keyboard
Bus 001 Device 005: ID 0bda:b812 Realtek Semiconductor Corp. RTL88x2bu [AC1200 Techkey]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Last, is the output when I try to install the wifi driver:
Code: Select all
wyckyd@ucs:~/Downloads/88x2bu-20210702-main
$ sudo ./install-driver.sh
[sudo] password for wyckyd:
A required package is not installed.
Please install the following package: gcc
Once the package is installed, please run "sudo ./install-driver.sh"
Hope this helps. I still need to be able to install build-essential offline.
TIA,
WyCKyD
Re: C++ compiler?
Posted: Wed Nov 08, 2023 12:41 pm
by operadude
Stevo wrote: Wed Nov 08, 2023 9:54 am
build-essential will also install and configure essential tools, such as "make".
You don't need multilib packages unless you plan to cross-compile.
Great.
Thanks!

Re: C++ compiler?
Posted: Wed Nov 08, 2023 12:55 pm
by l0dr3
WyCKyD wrote: Wed Nov 08, 2023 12:27 pm
Here is some info about the computer that I am speaking about. Still not able to install the wifi driver because gcc isn't installed.
:
Hope this helps. I still need to be able to install build-essential offline.
Have a look at
https://stackoverflow.com/questions/137 ... y/39968534 .
HTH, greetz l0dr3
Re: C++ compiler?
Posted: Wed Nov 08, 2023 3:13 pm
by WyCKyD
I tried the steps that they outlined on the link, but still nothing.
Thank you for your input though. It is very much appreciated. I am willing to try almost anything to get this working right.
Re: C++ compiler?
Posted: Wed Nov 08, 2023 6:03 pm
by kmathern
These are links to the packages you would need to download to install build-essential:
Code: Select all
http://deb.debian.org/debian/pool/main/g/gcc-12/libstdc%2b%2b-12-dev_12.2.0-14_amd64.deb
http://deb.debian.org/debian/pool/main/g/gcc-12/g%2b%2b-12_12.2.0-14_amd64.deb
http://deb.debian.org/debian/pool/main/g/gcc-defaults/g%2b%2b_12.2.0-3_amd64.deb
http://deb.debian.org/debian/pool/main/b/build-essential/build-essential_12.9_amd64.deb
I got the links using apt-get's --print-uris option
Code: Select all
apt-get --print-uris install build-essential
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
g++ g++-12 libstdc++-12-dev
Suggested packages:
g++-multilib g++-12-multilib gcc-12-doc libstdc++-12-doc
The following NEW packages will be installed:
build-essential g++ g++-12 libstdc++-12-dev
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 12.7 MB of archives.
After this operation, 57.0 MB of additional disk space will be used.
'http://deb.debian.org/debian/pool/main/g/gcc-12/libstdc%2b%2b-12-dev_12.2.0-14_amd64.deb' libstdc++-12-dev_12.2.0-14_amd64.deb 2046372 MD5Sum:ebf5cd67cf8a1c4168144ad096723ed0
'http://deb.debian.org/debian/pool/main/g/gcc-12/g%2b%2b-12_12.2.0-14_amd64.deb' g++-12_12.2.0-14_amd64.deb 10694356 MD5Sum:c7ddaa4c1a2490b837c9ee95198bc9d7
'http://deb.debian.org/debian/pool/main/g/gcc-defaults/g%2b%2b_12.2.0-3_amd64.deb' g++_4%3a12.2.0-3_amd64.deb 1356 MD5Sum:ee1214564633e8a0ec102e218b4c66ca
'http://deb.debian.org/debian/pool/main/b/build-essential/build-essential_12.9_amd64.deb' build-essential_12.9_amd64.deb 7704 MD5Sum:4f52ee9542b58fce300ae068b634d281
You would download them and save all in the same folder. I think the
Open With "Deb Installer" rightclick action will then install them for you if you right click on one of them.
edit: the links are only for MX23 (64bit) and may change in the future with package updates
edit 2: right click on the build-essential .deb file
Re: C++ compiler?
Posted: Wed Nov 08, 2023 6:49 pm
by dolphin_oracle
@kmathern the man the myth the legend!
Re: C++ compiler?
Posted: Thu Nov 09, 2023 2:34 pm
by WyCKyD
Hello and thank you for responding. I downloaded the files that you mentioned, but when I go to install them, I get the following error:
Code: Select all
dpkg: dependency problems prevent configuration of build-essential:
build-essential depends on gcc (>= 4:10.2); however:
Package gcc is not installed.
dpkg: error processing package build-essential (--install):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of g++:
g++ depends on gcc (= 4:12.2.0-3); however:
Package gcc is not installed.
dpkg: error processing package g++ (--install):
dependency problems - leaving unconfigured
Setting up libstdc++-12-dev:amd64 (12.2.0-14) ...
Setting up g++-12 (12.2.0-14) ...
Errors were encountered while processing:
build-essential
g++
I really would like to be able to install the drivers for my wifi adapter in MX 23.1 KDE AHS. I downloaded the MX 23.1 iso image and that is what I am using. I really like and enjoy MX! I have enjoyed MX linux since MX 18.
TIA
Re: C++ compiler?
Posted: Thu Nov 09, 2023 3:07 pm
by WyCKyD
I formatted and reinstalled MX 21.3 and then installed the wifi drivers without incident. I will try to upgrade to MX 23.1 later today.
It's a shame that the necessary files for compiling wifi drivers was left out of the MX 23.1 iso.
Re: C++ compiler?
Posted: Thu Nov 09, 2023 3:20 pm
by dolphin_oracle
gcc is a metapackage and was added to our package lists after 23.1's release. it will be on future releases and the november snapshots.
Re: C++ compiler?
Posted: Thu Nov 09, 2023 3:29 pm
by kmathern
Might need to manually download the gcc package too. I'll check later, I'm not at my computer right now (posting this from my phone).
I tested installing build-essential from a mx23 install I've been using for a while and gcc might've already been installed. I'll test it again in a LiveUsb session.
Earlier MX versions came with build-essential preinstalled, I'm not sure when they stopped doing that.
Re: C++ compiler?
Posted: Thu Nov 09, 2023 4:02 pm
by kmathern
Okay, in a fresh LiveUSB session where nothing has been installed yet it looks like you also need the gcc package (download link below)
Code: Select all
http://deb.debian.org/debian/pool/main/g/gcc-defaults/gcc_12.2.0-3_amd64.deb
Installing in LiveUsb session
Code: Select all
demo@mx1:~
$ apt-get --print-uris install build-essential
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
g++ g++-12 gcc libstdc++-12-dev
Suggested packages:
g++-multilib g++-12-multilib gcc-12-doc gcc-multilib autoconf automake libtool flex bison gdb gcc-doc libstdc++-12-doc
The following NEW packages will be installed:
build-essential g++ g++-12 gcc libstdc++-12-dev
0 upgraded, 5 newly installed, 0 to remove and 38 not upgraded.
Need to get 12.8 MB of archives.
After this operation, 57.0 MB of additional disk space will be used.
'http://deb.debian.org/debian/pool/main/g/gcc-defaults/gcc_12.2.0-3_amd64.deb' gcc_4%3a12.2.0-3_amd64.deb 5216 MD5Sum:f3dcf34728690484124bce954cc2c734
'http://deb.debian.org/debian/pool/main/g/gcc-12/libstdc%2b%2b-12-dev_12.2.0-14_amd64.deb' libstdc++-12-dev_12.2.0-14_amd64.deb 2046372 MD5Sum:ebf5cd67cf8a1c4168144ad096723ed0
'http://deb.debian.org/debian/pool/main/g/gcc-12/g%2b%2b-12_12.2.0-14_amd64.deb' g++-12_12.2.0-14_amd64.deb 10694356 MD5Sum:c7ddaa4c1a2490b837c9ee95198bc9d7
'http://deb.debian.org/debian/pool/main/g/gcc-defaults/g%2b%2b_12.2.0-3_amd64.deb' g++_4%3a12.2.0-3_amd64.deb 1356 MD5Sum:ee1214564633e8a0ec102e218b4c66ca
'http://deb.debian.org/debian/pool/main/b/build-essential/build-essential_12.9_amd64.deb' build-essential_12.9_amd64.deb 7704 MD5Sum:4f52ee9542b58fce300ae068b634d281
demo@mx1:~
$
Re: C++ compiler?
Posted: Thu Nov 09, 2023 6:05 pm
by anticapitalista
Off-topic - @kmathern great to see you here again!
Re: C++ compiler?
Posted: Thu Nov 09, 2023 6:11 pm
by Jerry3904
Agreed!