Golang cross-compilation: gccgo - unrecognized command line option `-marm` - linux

I'm trying to compile a Go app for linux/arm and keep running into problems on my Ubuntu machine. When I run GOOS=linux GOARCH=arm go build in my source directory, I get tons of erorrs that are variations of:
# github.com/huin/mqtt
gccgo: error: unrecognized command line option `-marm`
Running gccgo --help informs me that options starting with -g, -f -m (and others) will be passed on to any sub-processes started by gccgo, so I don't know which process it's sending -marm to.
Any clues? Ubuntu 14.10 LTS, 64bit

So thanks to a clue by Dean, I've worked out the issue and solved it.
The issue was caused by me installing Go via apt-get, then removing it (via apt-get), then installing Go from the golang website. There were still files left over from the first install, which were probably older versions and therefore didn't have support for the -marm flag.
I was going to wipe my dev machine anyway, so I did, installed Ubuntu again, installed Go from the website (not via apt-get) and everything worked first time. If you don't want to wipe your machine, then just make sure to look around to see if there are version conflicts.
I've been stung by this sort of thing before (when installing node.js via apt-get, realising it was many versions out of date, then removing, and installing node.js via source), so if anyone is reading this, be careful when installing software via apt-get, then upgrading, as you might have similar version issues like I did!

Related

Any success installing VMware Workstation on virgin Rocky Linux 8.5?

Using a virgin (but updated) version of Rocky Linux 8.5, I am trying to install VMware Workstation 16.2.1 (and others), but get compile errors during the first attempt to run, when vmmon and vmnet are being built.
All the proper, current headers from kernel-devel and kernel-headers are installed.
I tried upgrading to the 5.16.4 kernal at kernel.org, with all associated headers, and basically get the same errors.
"Unable to install all modules." i.e., vmmon and vmnet
Posts i have found with searching the net seem to indicate that there was a "back-port" of an upstream fix to Rocky that has affected the ability to build the loadable kernel modules necessary to run vmware - but i cannot confirm this is actually the problem that I am experiencing.
So i simply ask these questions: Can anyone (today) install VMware Workstation 16.2.1 (or any version), on a fresh install of Rocky Linux 8.5?
If so, would you please point me at your installation instructions, because I am unable to build "vmmon" and "vmnet" modules today (2022-01-04), that allow me to actually run virtual machines with vmware? (The kernel modules fail to compile and build.)
(and after 15 years of using stackoverflow i do not have the reputation to create a "rocky-linux" question tag...)
See https://unix.stackexchange.com/questions/689436/the-vmmon-and-vmnet-vmware-workstation-kernel-modules-fail-to-build-on-rocky-lin
mbubecek's instructions work for a variety of releases and should compile perfectly and run without issue, if you follow his instructions.
I have successfully used these methods at least a half dozen times with Rocky 8.5 and 8.6 with vmware workstation 16.1 up to version 16.2.1
NOTE: This error is NOT Rocky Linux specific. Also happens on some versions of RHEL 8 and CentOS 8.x I would also expect this "fix" to work on all of the other linux versions that are RHEL 8-derived.
I've been having difficulty with the same issue, and a colleague pointed me to check my kernel. This is our "official" resolution. See if the below works for you.
This is due to differences between the kernel and the source code for the VMWare modules, see here for more information. You can get the correct kernel modules, and build them by executing the following commands
wget https://github.com/mkubecek/vmware-host-modules/archive/workstation-16.1.0.tar.gz
tar -xf workstation-16.1.0.tar.gz
cd vmware-host-modules-workstation-16.1.0/
make
sudo make install
If you get the error,
crosspage.c:53:16: fatal error: linux/frame.h: No such file or directory
The error is described here. The solution is to remove (i.e. comment out) the offending include file in crosspage.c After doing the sudo make install, it is a very good idea to restart you host.
You may need to manually insert the modules into the kernel the first time after running make install'. The kernel modules (vmmon.ko and vmnet.ko) will be found at /lib/modules//misc. The following set of command will do this:
cd /lib/modules/$(uname -r)/misc
sudo insmod vmmon.ko
sudo insmod vmnet.ko
The modules should be load automatically after a restart/reboot.
If you update vmware to a different version (say 16.2.1) you may need to this again. Just change the versions in the above commands. If you hit the update button on the splash-screen and failed to notice the version you are updating to, you can run `vmware -v' at a command prompt to get the version you updated to.

Error setting up ddd to debug bash scripts

I am comparatively new to Linux. I am running Fedora 64 bit at my PC. I am having difficulty setting up ddd with bashdb. I am able to install it using yum but when I run it for bashdb, the software environment for ddd comes up but it keeps on working for infinite time, unless I manually kill it.
I used google to know what the problem is and came to know many people are having same problem, when using linux's package installers. It has bugs so I have to compile the latest source and install it manually. So I downloaded the source and tried to ./configure, it produced the following error and exited:
configure: error: Cannot find termcap compatible library
I searched again and found out I need termcap library at my PC, here:
https://lists.gnu.org/archive/html/bug-ddd/2013-01/msg00004.html
http://www.cplusplus.com/forum/unices/58299/
I used yum to install ncurses but found out it is already installed. Used locate to find the path of ncurses and passed it to configure using following commands:
sudo ./configure --with-termlib-libraries=/lib/libncurses.so.5
sudo ./configure --with-termlib-libraries=/lib/libncurses.so.5.9
Still, I am having the same error.
It is very frustrating because I have tried almost everything I found on internet. May be, there is a minor point that I am overlooking due to my inexperience. My main concern is to be able to debug complex bash scripts that I am going to develop in near future. I am not very comfortable with command line debugging i.e. without an interface. Any tips/advice that, can get me going with debugging with some other application may be, are also welcomed
I installed the ncurses development package to get past this problem:
sudo yum install ncurses-devel*

Node JS ./configure + make fails unable to remap python lib-dynload/itertools.dll to same address as parent

This might be more of a CYGWIN question than a Nodejs but here goes.
I installed Cygwin yesterday and on the packages selection I just clicked next as it looked like most were pre-selected, and then today read this guide http://boxysystems.com/index.php/step-by-step-instructions-to-install-nodejs-on-windows/ on installing nodejs.
The ./configure had an error that it was unable to remap python lib-dynload/itertools.dll to same address as parent. As the process still completed I tried the make command, but it fails on the same error.
So, I opened cygwin setup.exe and this time I clicked the source checkbox for all the Python packages. But still get the same error. Should I now go to Cygwin and check all the source packages for the Make packages, delete it and reinstall from scratch using the above guide. Or something else?
Any help gratefull received/
Use the official 0.5.x windows build from http://nodejs.org/#download - you just have to download a .exe file and you can start it.
Versions 0.5.X have problems with Cygwin and because of developing clean Windows version Cygwin environment is now unsupported. Stable version 0.4.12 builds on Cygwin with no problems. If you want to use node.js unstable 0.5.X branch on Windows use windows build at official node.js site.
check this out:
https://github.com/joyent/node/wiki/Building-node.js-on-Cygwin-(Windows)
Update Sept 1, 2011 -- as of today, v0.5.5 does not build on Cygwin (errors on make). Use v.0.5.4 (ie. follow instructions below and use "git checkout v0.5.4".
https://github.com/joyent/node/wiki/API-changes-between-v0.4-and-v0.6
Cygwin build is no longer supported. Use native windows builds instead.

Problem installing sqlite3-ruby on cygwin

I'm getting error while trying to install sqlite3-ruby gem:
gem install sqlite3-ruby-1.3.1.gem
Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby-1.3.1.gem:
ERROR: Failed to build gem native extension.
/usr/bin/ruby.exe extconf.rb
Gem files will remain installed in /usr/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.1/ext/sqlite3/gem_make.out
Same using:
gem install sqlite3-ruby-1.3.1
And that worked:
gem install sqlite3-ruby-1.3.1-x86-mswin32-60.gem
However I discovered I had had installed sqlite-ruby-1.2.5
Well my question is how 'gem' is installing these things? Why it can't choose sqlite3-ruby-1.3.1-x86-mswin32-60.gem version automatically. Does 'gem' is aware of running on linux or windows? What is native extension for it and why it is failing to install predownloaded sqlite3-ruby-1.3.1.gem
Thanks in advance
Lots of people seem to be having this issue. I'm surprised this doesn't work out of the box, as I would have guessed cygwin+ruby+sqlite is a supercommon configuration. Anyway. Many people concentrate on sqlite3.h, which is what appears are missing in the error output. However, my problem was that gcc wasn't installed correctly. Apparently gcc can fail to install correctly under cygwin. I fixed that and it was fine. Also, make sure you install libsql3-devel in cygwin.
I've been down this road before. I failed installing Ruby in Windows to work with Cygwin and I failed on Ubuntu.
What you do to save yourself the time and trouble is get a VM running with a Linux image (Fedora seemed to work well) and work with Ruby in that.

C++ Not Installed In Cygwin

I just installed Cygwin and can launch a bash shell from windows, do ls, emacs, vi , etc. However, when I do g++ it says command not found.
I thought g++ was installed by default in Cygwin? If that's not the case, what are the exact categories under which I can add g++ as a package to my cygwin?
Did you install the Devel packages?
I would suggest you read this tutorial to get up and running.
It's a good idea to just install everything with CygWin. When you run setup, just click on the circular icon at the top level until it reads "Full" rather then "Default" - that will install all the packages.
I've sometimes had trouble installing single packages due to dependencies but a full install is not affected by that same problem.
Disk space is cheap, your time spent trying to figure out why things don't work is not.

Resources