solving a clang++ compiler problem on linux mint 22.1

During my initial setup of Linux Mint on the Samsung Series 7, I installed the Flutter toolkit ( https://docs.flutter.dev/get-started/install/linux ). Flutter has additional application requirements, one of which is Clang. So I installed all the additional requirements, then installed Visual Studio Code, then within VSCode I installed Flutter plugin.

Note that I did not install support for Android (Android SDK and Android Studio) nor the Web (via Chrome). All I’m doing is writing Flutter desktop applications.

The Flutter plugin within VSCode automates quite a lot. Using the VSCode Command Palette, you can create an initial Flutter application (Flutter: New Project) that will create skeleton code and build files that compiles and runs the graphical equivalent of hello, world.

Visual Studio Code with the Flutter plugin and an initial Flutter application, running that application in debug mode.

As you can see, the Flutter tools for both the framework and the VSCode plugin provide an effortless on-ramp to developing applications. Creating the start of an application is ridiculously easy, and it’s capable of building and executing from the get-go. One feature this has and I use quite a lot is hot reload. When I make changes to the code, when I save the changes they’re rebuilt and the running application restarted immediately showing those changes. That’s why I use this setup.

Sample Flutter application running on the desktop.

And here is the initial application’s extremely simple desktop window. When this works well, it’s a little like magic.

Unfortunately I ran into a problem where Clang, one of Flutter’s dependencies, could not link a C++ application that is part of the Flutter application. The error message reported by the Flutter tooling was (with much superfluous reporting snipped away):

...
/usr/bin/ld: cannot find -lstdc++: No such file or directory
...

This really annoyed me because I have this same setup on my other Linux Mint system, the UM250. With a bit of googling I discovered what was wrong, and how I’d accidentally side-stepped the issue on the UM250. I solved the problem on the Series 7 with sudo apt install libstdc++-12-dev. After that the Flutter tool chain just worked.

Why didn’t I see this issue on the UM250? Because I’d installed gcc/g++ version 12 to support another small project I was working on. On the UM250 I have both versions 11 and 12. Then when I later updated an older installation of Flutter and ran the same simple tests, everything worked there as well. I don’t intend to install gcc/g++ version 12 on the Series 7 as there is no need.

What I don’t understand is how Clang and GCC got out of sync on Linux Mint 22.1. The version of Clang installed is version 14, and requires libstdc++-12. Unfortunately Linux Mint 22.1 installs GCC version 11, which means that if you wanted to build with Clang you’re out of luck unless you know of Clang 14’s dependencies.

migrating from windows 10 to linux mint 21.1

I have been threatening, for many years now, to switch from Windows 10 Professional to Linux on my Samsung Series 7 Chronos 700Z7C 17.3″ portable computer. Every time I decided to do it, I’d go look for any directions from prior switches, only to be dissuaded from doing so by horror stories of Linux bricking the Series 7 because of the way its BIOS was set up. But after many false starts, I was finally pushed to find a successful solution to migrating the Series 7 off Windows 10 and onto Linux Mint 21.1.

The final straw that broke the proverbial camel’s back and drove me to finally make the switch are all the current stories about what Microsoft has been doing with Windows 11 and Microsoft’s Edge browser and Windows 11 and advertising within the desktop. That, along with the fact that the Series 7 can’t upgrade to Windows 11 because it’s not worthy; the Series 7 doesn’t support TPM (Trusted Platform Module) 2.0. The Samsung Series 7 was first released in 2012, and I bought my copy in 2013, so I can see why TPM isn’t a part of the system. But until Windows 11 was introduced, Microsoft Windows supported the Series 7 from Windows 8 thru Windows 8.1 and onwards to the free upgrade to Windows 10 with nary complaint nor issue. Not one. If I can give Microsoft a complement, it’s that Windows supported this computer for over a decade, far longer than any other manufacturer, especially Apple. What makes the case against Apple even more damning is that Microsoft didn’t make the hardware. To add further praise to Samsung, I’ve never had a problem with any Samsung computer since 2010 when I bought the R580, and which is currently running with Fedora 38. As a contrast to Apple, I bought a mid-2015 15″ Retina MacBook Pro fully kitted out in 2015. Apple stopped updating macOS on that machine with Monterey 12.6.1. Macs in good stead are currently running Ventura 13.3.1. Anyway…

Installing Linux

The ability to install Linux on the Samsung Series 7 was very non-intuitive. Documentation repeatedly states that holding down, or rapidly tapping, the F2 key while the computer is booting will put you in the Phoenix BIOS configuration menu. It never did. Since I knew I wanted to replace the SSD with Windows 10 installed, I purchased a cheap Samsung 1TB SSD ($50 — my how prices have dropped), swapped it into the machine in place of the SSD with Windows 10 installed, and then tried to force the computer to automatically drop into the Phoenix BIOS menu when I powered it up with that blank SSD. It would not. Instead, if you had a USB drive with a Linux ISO copied to it, then the Samsung would sense this and present a very simple menu that allowed you to select that USB drive as the boot device.

Before I’d decided to install Linux, I downloaded Xubuntu 23.04, Fedora WS 38, and Linux Mint 21.1 ISOs and flashed them to individual USB drives. I wasn’t sure how Linux might support such an old computer, and I decided to try a few different ones before making my final installation decision. I chose Xubuntu because a reviewer on DistroWatch wrote that it was decent, so I thought, why not?

I started with Xubuntu. Plugging in the Xubuntu USB drive and selecting it on the Samsung built-in menu, when the Xubuntu USB drive booted I was greeted with the following Xubuntu boot menu:

Untitled

Down at the bottom of the Xubuntu menu was an entry for UEFI firmware settings! Sure enough, if I selected that it opened up the Phoenix BIOS BIOS settings. As it turns out the same capability is available with Linux Mint, but not with Fedora. A little bit of testing showed that all of my USB drives would boot this way from the Samsung boot menu. I also discovered that if I tried to boot the Linux Mint USB that it failed some sort of purity test and wouldn’t boot at all, while the Fedora USB booted and had problems working with the processor. So I plugged the Xubuntu USB drive back in and selected the UEFI firmare.

Long story short: when you’re in the Phoenix BIOS screens, move over to Boot and make the following changes.

Untitled

  • Disable Secure Boot
  • Set OS Mode Selection to UEFI and CSM OS. That allows anything to boot, including Windows 10, as well as Windows 7, Windows XP, and DOS (yes, that’s what the help screen on the right said), As well as Linux.
  • Go down to PXE OPROM and enable it, and then select the USB to be the first item to boot. If you don’t do this then you won’t be able to boot with a USB device because the BIOS will automatically boot the SSD first.

After much fiddling around and booting all the distributions, I settled on Linux Mint because I already had it running on my UM250 and I’m quite comfortable with it.

One feature that I discovered after installing Mint. Once secure boot was disabled, a one line menu appeared at the bottom of the screen during boot, listing F2 to bring up the Phoenix BIOS menu, and F4 to boot into recovery. F2 still did not work, but F4 put me into the Grub menu, which included the UEFI firmware settings at the bottom. So that was a sweet feature to have.

One piece of software you should not install is the Nvidia GPU driver. The Samsung machine comes with a separate Nvidia chip for those intense 2013 games you want to run, along with the Intel i7’s built in GPU. The Nvidia GPU drive is buggy, and causes the Samsung to run hot with the fans blowing full speed. Rather than trying to uninstall the Nvidia package, I just re-installed Linux Mint to make sure it was totally gone. When the Mint ever-so-helpful app popped up asking if I wanted to install that driver, I configured it to ignore that recommendation and moved on.

Initial Impressions

This was the last computer in my household that was still running any version of Windows. Now they all run Linux or macOS. Give me time and suitable motivation and I’ll be replacing macOS with Linux as well, especially on those machines that are no longer supported by Apple.

The Samsung machine runs smoothly without any issues. I’ve installed some tools and run some basic compiles and it will, from time to time, fire up the fans a bit, but then immediately goes silent with the task is done. Every piece of gear on this machine works, including the built-in CDROM drive, which is why I wanted to keep this machine operational. The older R580 has a build-in Blue Ray DVD reader/writer, which is an important reason why I’m also keeping it up and running.

I’m able to play multi-media, and I have full WiFi and Bluetooth functionality. I’m writing this on the Samsung, connected to my home WiFi access point, and using a Logitech MX Ergo Bluetooth trackball. As a consequence I have the touch-pad disabled when the Bluetooth trackback is active, which is a much nicer setup than I had under Windows; it was either enable or disable the touch-pad, not the elegant solution provided by Linux Mint.

I may have more to write after working on this machine for a while. Linux Mint has re-invigorated it for me. Call me silly, but I don’t like junking machines anymore. The Samsung may be eleven years old, but it’s still quite usable.