Unable to compile MeshLab from source on Ubuntu 16.10 - compilation

I've downloaded the MeshLab sources and updated my Qt installation to the latest (Qt Creator 4.2.0 built on Dec 9, 2016). On my first attempt to compile the meshlab_full project I found that I had to rename the io_txt folder under plugins_experimental to io_TXT. But after that it fails with this error:
In file included from ../../src/common/meshmodel.h:32:0,
from ../../src/common/filterparameter.cpp:32: ../../src/common/ml_mesh_type.h:4:33: fatal error:
vcg/complex/complex.h: No such file or directory #include
^ compilation terminated.
Indeed there is no vcg folder. How do I get it?
Thanks,
Rich

You need to get vcg lib. It must be at the same level than your meshlab directory :
yourdevelfolder/
|
├──meshlab
│ ├──docs
│ ├──README.md
│ ├──src
│ ├──...
│ └──...
└──vcglib
├──apps
├──doc
├──eigenlib
├──...
└──...
Than you must get vgclib sources :
$ git clone https://github.com/cnr-isti-vclab/vcglib.git
$ cd vcglib
$ git checkout devel
Instructions for compilation are there

Update
As commented by #AlessandroMuntoni , we can use --recursive option, and VCG would automatically be available as a submodule:
git clone --recursive https://github.com/cnr-isti-vclab/meshlab
Original post
In meshlab.pro it is commented:
# MESHLAB_SOURCE_DIRECTORY: the directory where is placed the main meshlab.pro
In general.pri it is set:
# VCG directory
VCGDIR = $$MESHLAB_SOURCE_DIRECTORY/../vcglib
Therefore, I forked and cloned the VCG library inside:
|
└──meshlab (Git clone)
├──docs
├──README.md
├──src (`meshlab.pro` is inside this)
├──...
├──...
└──vcglib (Git clone)
It worked for me =)

Related

`pip install -e .` does not add folder to path

I’m trying to install locally a personal package that I called circuits.
I installed it with pip install -e ., it shows up in the pip list, but I have a ModuleNotFoundError when I try to import it.
(venv) pip install -e .
Obtaining file:///Users/me/my_project/circuits
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build editable ... done
Preparing editable metadata (pyproject.toml) ... done
Requirement already satisfied: numpy in /Users/me/my_project/venv/lib/python3.9/site-packages (from circuits==0.1.0) (1.23.3)
Requirement already satisfied: tabulate in /Users/me/my_project/venv/lib/python3.9/site-packages (from circuits==0.1.0) (0.8.10)
Building wheels for collected packages: circuits
Building editable for circuits (pyproject.toml) ... done
Created wheel for circuits: filename=circuits-0.1.0-0.editable-py3-none-any.whl size=2277 sha256=a1ab6479e6d2761d7aae5cb156dd239001e54c397e712e279c6331b9ed217d0d
Stored in directory: /private/var/folders/mw/k72xg0bx6yz48vzqq4fbgsk80000gn/T/pip-ephem-wheel-cache-d5600og9/wheels/6d/ed/4d/6b97818bf8ea2c80312b9134aa990bb61b776a1399143dec7d
Successfully built circuits
Installing collected packages: circuits
Attempting uninstall: circuits
Found existing installation: circuits 0.1.0
Uninstalling circuits-0.1.0:
Successfully uninstalled circuits-0.1.0
Successfully installed circuits-0.1.0
(venv) cd ../projects
(venv) python -c "import circuits"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'circuits'
It turns out that the package is not added to my sys.path, although other packages that also are on my laptop are when I install them the same way.
I suspect that there may be some link with the fact that there already exists a package with the same name on pypi (https://pypi.org/project/circuits/)
which python returns /Users/me/my_project/venv/bin/python
which pip returns /Users/me/my_project/venv/bin/pip
Project directory structure:
.
├── README.md
├── build
│   └── bdist.macosx-12-arm64
├── circuits
│   ├── file_a.py
│   ├── file_b.py
│   └── file_c.py
├── circuits.egg-info
│   ├── PKG-INFO
│   ├── SOURCES.txt
│   ├── dependency_links.txt
│   ├── requires.txt
│   └── top_level.txt
├── pyproject.toml
├── setup.cfg
pyproject.toml content:
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
setup.cfg content:
[metadata]
name = circuits
version = 0.1.0
authors = ["me"]
[options]
packages = find:
install_requires =
numpy
I use MacOS 12.6
--
Edit 1: added precisions on the config and project tree, removed screenshot.
Try this
python -m pip install -e .
The outcome of pip install -e . is mostly based on project structure and on the content of package metadata files like setup.py, setup.cfg, pyproject.toml. These files are used to instruct pip how to install a Python package.
I suggest you to review how to build Python packages and how write the metadata files. Take a look here, it should give a basis: https://python-packaging-tutorial.readthedocs.io/en/latest/setup_py.html.
Another thing is that I see on the provided screenshot you install your package into its Virtual environment. I'm not sure if that's really what your need. In this case even if pip install -e . worked you'd only have access to your package from that venv, not from system Python installation.
If you just want to test your package interactively, just enter venv and run Python interpreter from the root project dir. Then you'll have access to own packages/modules and its dependencies installed to the venv.
Otherwise, if you need to install your package into system Python env, you need to pip install -e . outside of project's venv.
As #sinoroc pointed out in the comments, it was missing a __init__.py file in circuits

Kagami/go-face on Golang Environment error

I am having this problem which has drive me crazy for a few days. I tried to install Kagami/go-face lib in Golang for my project. I already installed dlib library using MSYS successfully. I also download Kagami/go-face from git into GOPATH directory. However, when I run 'go run main.go' command in my Golang project, it show this message error:
PS C:\Users\DELL\go\src\go-face-example> go run main.go
# github.com/Kagami/go-face
classify.cc:2:10: fatal error: dlib/graph_utils.h: No such file or directory
2 | #include <dlib/graph_utils.h>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.

Buildroot error when building with Ubuntu 21.10

I am trying to compile linux for RISCV Arch using buildroot(busybox). I was using 18.04 and 20.04 previously and had no issues compiling it. Right now, I have upgraded it to 21.10 for building some other stuffs. I have moved my toolchain and I can find it using the which command. When I try to compile linux I get some error which I havn't faced in the earlier versions.
>>> host-m4 1.4.18 Building
In file included from /usr/include/signal.h:328,
from ./signal.h:52,
from c-stack.c:49:
c-stack.c:55:26: error: missing binary operator before token "("
55 | #elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384
| ^~~~~~~~
CC closein.o
c-stack.c:134:8: error: variably modified 'buffer' at file scope
134 | char buffer[SIGSTKSZ];
| ^~~~~~
CC closeout.o
I am confused on how different versions can cause this error.
Thanks in advance.
It looks like you have hit a change in GNU C Library version 2.34 that can make SIGSTKSZ non-constant.
From the GNU C Library 2.34 release announcement:
Add _SC_MINSIGSTKSZ and _SC_SIGSTKSZ. When _DYNAMIC_STACK_SIZE_SOURCE or _GNU_SOURCE are defined, MINSIGSTKSZ and SIGSTKSZ are no longer constant on Linux. MINSIGSTKSZ is redefined to sysconf(_SC_MINSIGSTKSZ) and SIGSTKSZ is redefined to sysconf (_SC_SIGSTKSZ). This supports dynamic sized register sets for modern architectural features like Arm SVE.
A possible workaround is to configure buildroot to build host-m4 version 1.4.19 instead of 1.4.18, because it no longer uses SIGSTKSZ.
I saw that error when building on Ubuntu 22.04 for an embedded Linux board using Buildroot. It got stuck when building the host-m4 package. #Ian Abbott is right:
A possible workaround is to configure buildroot to build host-m4 version 1.4.19 instead of 1.4.18, because it no longer uses SIGSTKSZ.
In Buildroot, to update from m4 v 1.4.18 to 1.4.19, simply grab the latest files here: https://github.com/buildroot/buildroot/tree/master/package/m4
As of right now (9 Jan. 2023), the upstream Buildroot m4 version there is
1.4.19, as shown here: https://github.com/buildroot/buildroot/blob/master/package/m4/m4.mk#L7:
################################################################################
#
# m4
#
################################################################################
M4_VERSION = 1.4.19
M4_SOURCE = m4-$(M4_VERSION).tar.xz
M4_SITE = $(BR2_GNU_MIRROR)/m4
M4_LICENSE = GPL-3.0+
M4_LICENSE_FILES = COPYING
$(eval $(host-autotools-package))
How to upgrade/update any buildroot package to the latest upstream version, from the command-line
Here is an example of how to upgrade any buildroot package from the command-line. In these commands, I am upgrading the m4 package, to solve the problem in the OP's question. Change the word m4 in all 3 places to the name of the package you'd like to update:
# initially:
cd path/to/buildroot
git remote add upstream https://github.com/buildroot/buildroot.git
git fetch upstream master
# then (from within the "buildroot" repo or subrepo)
rm -r package/m4
git checkout upstream/master -- package/m4
git add -A
git status
git commit -m "Update m4 library"

-bash: gcloud: command not found on Mac

I'm following the Quickstart for Mac OS X to install the cloud SDK. Following the steps exactly,
1) python -V returns "Python 2.7.10"
2) Download and extract using ./install.sh the 64bit version of the SDK in google-cloud-sdk returns...
Welcome to the Google Cloud SDK!
To help improve the quality of this product, we collect anonymized usage data
and anonymized stacktraces when crashes are encountered; additional information
is available at <https://cloud.google.com/sdk/usage-statistics>. You may choose
to opt out of this collection now (by choosing 'N' at the below prompt), or at
any time in the future by running the following command:
gcloud config set disable_usage_reporting true
Do you want to help improve the Google Cloud SDK (Y/n)? Y
Your current Cloud SDK version is: 170.0.1
The latest available version is: 170.0.1
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Components │
├───────────────┬──────────────────────────────────────────────────────┬──────────────────────────┬───────────┤
│ Status │ Name │ ID │ Size │
├───────────────┼──────────────────────────────────────────────────────┼──────────────────────────┼───────────┤
│ Not Installed │ App Engine Go Extensions │ app-engine-go │ 97.7 MiB │
│ Not Installed │ Cloud Bigtable Command Line Tool │ cbt │ 4.0 MiB │
│ Not Installed │ Cloud Bigtable Emulator │ bigtable │ 3.5 MiB │
│ Not Installed │ Cloud Datalab Command Line Tool │ datalab │ < 1 MiB │
│ Not Installed │ Cloud Datastore Emulator │ cloud-datastore-emulator │ 15.4 MiB │
│ Not Installed │ Cloud Datastore Emulator (Legacy) │ gcd-emulator │ 38.1 MiB │
│ Not Installed │ Cloud Pub/Sub Emulator │ pubsub-emulator │ 33.2 MiB │
│ Not Installed │ Emulator Reverse Proxy │ emulator-reverse-proxy │ 14.5 MiB │
│ Not Installed │ Google Container Local Builder │ container-builder-local │ 3.7 MiB │
│ Not Installed │ Google Container Registry's Docker credential helper │ docker-credential-gcr │ 2.2 MiB │
│ Not Installed │ gcloud Alpha Commands │ alpha │ < 1 MiB │
│ Not Installed │ gcloud Beta Commands │ beta │ < 1 MiB │
│ Not Installed │ gcloud app Java Extensions │ app-engine-java │ 128.1 MiB │
│ Not Installed │ gcloud app PHP Extensions (Mac OS X) │ app-engine-php-darwin │ 21.9 MiB │
│ Not Installed │ gcloud app Python Extensions │ app-engine-python │ 6.5 MiB │
│ Not Installed │ kubectl │ kubectl │ 15.9 MiB │
│ Installed │ BigQuery Command Line Tool │ bq │ < 1 MiB │
│ Installed │ Cloud SDK Core Libraries │ core │ 6.7 MiB │
│ Installed │ Cloud Storage Command Line Tool │ gsutil │ 3.0 MiB │
└───────────────┴──────────────────────────────────────────────────────┴──────────────────────────┴───────────┘
To install or remove components at your current SDK version [170.0.1], run:
$ gcloud components install COMPONENT_ID
$ gcloud components remove COMPONENT_ID
To update your SDK installation to the latest version [170.0.1], run:
$ gcloud components update
==> Source [/Users/shaneoseasnain/Desktop/google-cloud-sdk/completion.bash.inc] in your profile to enable shell command completion for gcloud.
==> Source [/Users/shaneoseasnain/Desktop/google-cloud-sdk/path.bash.inc] in your profile to add the Google Cloud SDK command line tools to your $PATH.
For more information on how to get started, please visit:
https://cloud.google.com/sdk/docs/quickstarts
3) I've restarted the terminal and run gcloud init from inside google-cloud-sdk. This returns "command not found." If I run ls, I see the following directory structure:
LICENSE completion.zsh.inc path.fish.inc
README deb path.zsh.inc
RELEASE_NOTES install.bat platform
VERSION install.sh properties
bin lib rpm
completion.bash.inc path.bash.inc
4) I've tried to run gcloud init inside bin as well, but get the same problem, command not found.
The only other suggestions I can see from the install guide are "enable command-completion in your bash shell, and/or enable usage reporting." I'm not sure how to do this but command completion and reporting don't look like they should be related to this problem. There is a lot written about command not found but they relate to other problems where, for example, gcloud has stopped working after a while or problems in older versions. Has anyone a tip how to get the cloud sdk working?
Thanks
I had the same issue. A lazy and quick fix for this is to just run:
brew install --cask google-cloud-sdk
Found by googling.
For MAC OS - Use Homebrew
brew install --cask google-cloud-sdk
and then use
source "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc"
source "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc"
The gcloud executable lives in google-cloud-sdk/bin–to run gcloud. You'll need to either:
Add this directory to your $PATH. In particular, adding the line source /Users/shaneoseasnain/Desktop/google-cloud-sdk/path.bash.inc to your .bash_profile file (more detail on what this file does and how to pick one) will do the trick.
Specify the full path to the gcloud executable when you run it. In your case, this is /Users/shaneoseasnain/Desktop/google-cloud-sdk/bin/gcloud. So for example:
$ /Users/shaneoseasnain/Desktop/google-cloud-sdk/bin/gcloud init
The pertinent part of the quickstart (emphasis added):
Run the install script to add Cloud SDK tools to your path, enable command-completion in your bash shell, and/or enable usage reporting:
As to why the install script didn't work, I can't say. Please file an issue and we'll investigate.
Here's on macOS. I had the same problem. I got
gcloud: command not found
After running brew install --cask google-cloud-sdk, I found that I have to install it manually.
First, you will find install.sh under directory google-cloud-sdk, and you will run
.../google-cloud-sdk/install.sh
under the terminal. For my case,
the file is under
/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk
Second, run /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/install.sh
Third, there will be a message guide you to relaunch your terminal owing to your bash file or zsh file updated.
Fourth, gcloud -v to test if gcloud-cli work normally after you launch a new terminal.
In short:
emacs -nw ~/.zshrc
And add following line at the beginning:
# The next line updates PATH for the Google Cloud SDK.
source '/home/lesaint/GOOGLE_CLOUD/google-cloud-sdk/path.zsh.inc'
# The next lines enables bash completion in Zsh for gcloud.
autoload -U compinit compdef
compinit
source '/home/lesaint/GOOGLE_CLOUD/google-cloud-sdk/completion.zsh.inc'
The solution proposed by following article works for me:
http://www.javatronic.fr/tips/2014/10/17/installing_google_cloud_sdk_on_ubuntu_with_oh-my-zsh.html
TL;DR - follow the Interactive installer section of Installing Cloud SDK and the SDK will install correctly.
However, there is a real issue here which I believe is related to missing environment variables:
At first, I followed Quickstart for Mac OS X as well in order to install the Google Cloud SDK for the 'Mac OS X (x86_64) Platform'. This reproduced the exact same results as Shane outlined in his question above. Here are some more details:
Clean install of macOS Sierra 10.12.6 (latest) on a 2017 MacBook Pro.
Google Cloud SDK version 173.0.0. Specifically: google-cloud-sdk-173.0.0-darwin-x86_64.tar.gz which is the latest at the time of this writing and the one pointed to by the quickstart guide.
I was able to further pinpoint the problem in step 4 of the 'Before you begin' section of Quick Start for Mac OS X:
Set up the Cloud SDK for use. If you're having trouble getting the gcloud command to work, ensure your $PATH is defined appropriately. Run the install script to add Cloud SDK tools to your path, enable command-completion in your bash shell, and/or enable usage reporting:
./google-cloud-sdk/install.sh
'install.sh' invokes 'install.py' which at some point calls isatty() in order to find out whether the installation process was run from the shell which means it should be interactive and prompt the user for some information. For some reason, isatty() returns False instead of True! This causes to script to fall through non-interactively and - because 'install.sh' was invoked without arguments - Fail.
The following worked for me:
I moved the installer unzipped package to the ~ directory.
And then after running ./google-cloud-sdk/install.sh
I restarted the terminal again and ran 'gcloud init' and it worked.
Sometimes, after installation, you need just restart your terminal. that's it :)
take a look at here: Quickstart for macOS
for me that was the fix:
mkdir -p $sdk_dir/.install/
tl;dr;
It seems that the python library is locating the sdk_root by searching for an .install directory. See the config.py and the definition of CLOUDSDK_STATE_DIR
It seems like your google-cloud-sdk/bin does not appear in PATH.
copy your current PATH from:
echo $PATH
Now add your google-cloud-sdk/bin absolute path to PATH, don't forget to add a colon - ':', before you add your new path, it should be something like this:
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/Users/user/google-cloud-sdk/bin
I ran the install and init command from the folder, i kept downloaded SDK.
One it installed and initialized, i ran the command with folder name and it worked after that.
i ran below command from directory where i kept SDK-
./google-cloud-sdk/bin/gcloud
Follow these steps:
Press Command+Space and type Terminal and press enter/return key.
Run in Terminal app:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null ; brew install caskroom/cask/brew-cask 2> /dev/null
If the screen prompts you to enter a password, please enter your Mac's user password to continue. When you type the password, it won't be displayed on the screen, but the system would accept it. So just type your password and press ENTER/RETURN key. Then wait for the command to finish.
Run
brew cask install google-cloud-sdk
Reference:
http://macappstore.org/google-cloud-sdk/

'npm-windows-upgrade' is not recognized as an internal or external command

I ran
$ npm install --global --production npm-windows-upgrade
and it returned this positive looking feedback
├── cli-spinner#0.2.5
├── commander#2.9.0 (graceful-readlink#1.0.1)
├── chalk#1.1.3 (ansi-styles#2.2.1, escape-string-regexp#1.0.5, supports-color#2
.0.0, strip-ansi#3.0.1, has-ansi#2.0.0)
├── promise#7.1.1 (asap#2.0.4)
├── inquirer#1.0.3 (ansi-escapes#1.4.0, mute-stream#0.0.6, through#2.3.8, cli-wi
dth#2.1.0, strip-ansi#3.0.1, figures#1.7.0, pinkie-promise#2.0.1, run-async#2.2.
0, string-width#1.0.1, cli-cursor#1.0.2, rx#4.1.0, lodash#4.14.0)
├── babel-polyfill#6.9.1 (regenerator-runtime#0.9.5, babel-runtime#6.9.2, core-j
s#2.4.1)
├── regenerator-runtime-only#0.8.38 (promise#6.1.0, es6-symbol#2.0.1)
└── prompt#1.0.0 (revalidator#0.1.8, pkginfo#0.4.0, colors#1.1.2, read#1.0.7, ut
ile#0.3.0, winston#2.1.1)
But when I run
$ npm-windows-upgrade
I get
'$ npm-windows-upgrade' is not recognized as an internal or external
command
I was following the directions here. Any idea what's going on? I've been googling it for a while and not getting much more than those basic instructions.
UPDATE
Realized the issue was with everything I was trying to install globally. I thought the other packages I was trying to run worked but they did not. For example $ webpack returns the same error after installing it gloablly.
BACKGROUND
I'm running windows and had previously installed npm. When that started giving me all sorts of bugs I upgraded to npm3. I belive it was just
$ npm install npm3 -g
and then running all my commands starting with npm3, for example
$ npm3 install webpack --save
Today the same command gave me
'npm3' is not recognized as an internal or external command
So I tried to reinstall it with regular npm which gave me "'npm' ins not recognized..."
I was able to get npm working again after following these lovely instructions, but cannot figure out how to get back to version 3.
Also $ npm -v right now is 2.15.1
To answer my own question.
The problem was my path settings. Npm itself was working, but for some reason the location where it was installing global node modules was in different directory. I saw this when I ran
$ npm install npm-windows-upgrade -g
The first few lines it prints when you install show where it is being installed.
I noticed it was being installed in
C:\Users\(my_username)\AppData\Roaming\npm\nodemodules\npm-windows-upgrade
even though I had just fixed npm by pointing it to
C:\ProgramFiles\npm
so I changed that to the npm location it was actually using to
C:\Users\(my_username)\AppData\Roaming\npm
restarted my computer and it worked.
Here again are instructions to change your path variables.

Resources