Ultimaker / cura-build-environment

CMake project to build dependencies for Cura
GNU Affero General Public License v3.0
24 stars 55 forks source link

protobuf not found while compiling on ubuntu 20.4 #139

Closed wohltat closed 2 years ago

wohltat commented 2 years ago

I try to compile on ubuntu 20.4 and get the following error

> cmake -DCMAKE_PREFIX_PATH=./release -DCMAKE_INSTALL_PREFIX=./release -DCMAKE_BUILD_TYPE=Release ..
-- Using empty default value for CMAKE_OSX_DEPLOYMENT_TARGET
-- Conan: checking conan executable
-- Conan: Found program /home/username/.local/bin/conan
-- Conan: Version found Conan version 1.48.0
-- Conan: Installing config from https://github.com/ultimaker/conan-config.git
Trying to clone repo: https://github.com/ultimaker/conan-config.git
Repo cloned!
Copying file .gitignore to /home/username/.conan/.
Defining remotes from remotes.txt
Processing conan.conf
Copying file cura_build.jinja to /home/username/.conan/profiles
Copying file cura_debug.jinja to /home/username/.conan/profiles
Copying file cura.jinja to /home/username/.conan/profiles
Copying file cura_release.jinja to /home/username/.conan/profiles
-- Conan: checking conan executable
-- Conan: Found program /home/username/.local/bin/conan
-- Conan: Version found Conan version 1.48.0
-- Conan: Automatic detection of conan settings from cmake
-- Conan: Settings= -pr=default
-- Conan: checking conan executable
-- Conan: Found program /home/username/.local/bin/conan
-- Conan: Version found Conan version 1.48.0
-- Conan executing: /home/username/.local/bin/conan install /home/username/build/cura-build-environment/conanfile.py -pr=default -g=cmake --build=missing
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++
compiler.version=9
os=Linux
os_build=Linux
[options]
[build_requires]
[env]

protobuf/3.17.1: Not found in local cache, looking in remotes...
protobuf/3.17.1: Trying with 'ultimaker'...
Downloading conanmanifest.txt
ERROR: Failed requirement 'protobuf/3.17.1' from 'conanfile.py (cura-build-environment/None)'
ERROR: Unable to find 'protobuf/3.17.1' in remotes
CMake Error at build/conan.cmake:540 (message):
  Conan install failed='1'
Call Stack (most recent call first):
  build/conan.cmake:882 (old_conan_cmake_install)
  cmake/conan.cmake:15 (conan_cmake_run)
  CMakeLists.txt:17 (include)

-- Configuring incomplete, errors occurred!
See also "/home/username/build/cura-build-environment/build/CMakeFiles/CMakeOutput.log".

I already installed the following packages but it didn't help. apt install protobuf-compiler libprotobuf-dev protobuf-c-compiler libprotobuf-c-dev libprotobuf17

c-schloss commented 2 years ago

I'm having the same issue on Windows 10 in Visual Studios 17.2.0. I assume the issues has to do with the way the libraries are hosted but I'm not sure if there's a good way to find out what the issue is.

lbibass commented 2 years ago

I am having a similar issue on macOS.

agusventuri commented 2 years ago

Same issue. Was working correctly last wednesday (11/05). Something must have happened to where protobuf is hosted

vfrisach commented 2 years ago

I am having the same issue on Windows 10. Seems to be a problem with the remote location.

MrSurly commented 2 years ago

This got me past protobuf:

conda create --name p3.10 python=3.10
conda activate p3.10

pip install conan
cd cura-build-environment/
mkdir build && cd build
conan remote add conancenter https://center.conan.io
conan install --build=clipper --build=nlopt --build=protobuf ../conanfile.py
cmake -DCMAKE_PREFIX_PATH=./release -DCMAKE_INSTALL_PREFIX=./release -DCMAKE_BUILD_TYPE=Release ..
cmake --build .

But then it fails with Arcus, even though cmake builds it earlier in the process

-- Building with Arcus
CMake Error at CMakeLists.txt:25 (find_package):
  By not providing "FindArcus.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Arcus", but
  CMake did not find one.

  Could not find a package configuration file provided by "Arcus" with any of
  the following names:

    ArcusConfig.cmake
    arcus-config.cmake

  Add the installation prefix of "Arcus" to CMAKE_PREFIX_PATH or set
  "Arcus_DIR" to a directory containing one of the above files.  If "Arcus"
  provides a separate development package or SDK, be sure it has been
  installed.
feiticeir0 commented 2 years ago

I'm having the same problem using Gentoo Linux... I have protobuf 3.19.3 installed, but it complains.. Where does it looks for the files ?

jellespijker commented 2 years ago

We are in the process of switching to a different build system, that also means deprecating this cura-build-environment. See ultimaker/cura#12544

Make sure you clean the Conan cache as instructed in that PR.

feiticeir0 commented 2 years ago

We are in the process of switching to a different build system, that also means deprecating this cura-build-environment. See Ultimaker/Cura#12544

Make sure you clean the Conan cache as instructed in that PR.

I've tried the new building system, but getting this errors: ERROR: arcus/5.1.0-alpha+141@ultimaker/cura_9365: Error in generate() method, line 83 sip.configure(python_interpreter = self.deps_user_info["cpython"].python) while calling 'configure', line 76 with self.envvars.apply(): KeyError: 'PATH'

Don't know what it means...

jellespijker commented 2 years ago

Try clean the complete Conan cache, because we did a lot of changes in the meantime.

We also merged those changes in 5.1 now. Make sure you have the requirements installed, which are stated in the PR

Assuming you're on Mac/Linux:

rm -rf ~/.conan
pip install conan --upgrade
conan profile new default --detect
conan config install https://github.com/ultimaker/conan-config.git
conan remote remove cura 

This should get you in a totally fresh state

git clone https://github.com/ultimaker/cura
cd cure
git checkout 5.1
conan install . cura/5.1.0-beta+666@ultimaker/stable --build=missing --update -g VirtualPythonEnv
source venv/bin/activate
python cura_app.py
feiticeir0 commented 2 years ago

Hi ! Thank you for the reply. You guessed right, I'm using Linux, Gentoo Linux to be more specific. :)

I did everything you wrote, but still have the same error. After the command: conan install . cura/5.1.0-beta+666@ultimaker/stable --build=missing --update -g VirtualPythonEnv

I get the following error: ERROR: arcus/5.1.0-beta+92@ultimaker/stable: Error in generate() method, line 83 sip.configure(python_interpreter = self.deps_user_info["cpython"].python) while calling 'configure', line 76 with self.envvars.apply(): KeyError: 'PATH'

I had an error while configuring conan: This command: conan config install https://github.com/ultimaker/conan-config throws an error about not being a zip file. But after downloading the code as a zip file, it worked...

I know that conan is creating a virtual environment, but could it be something that I need to install ? A missing library or tool ?

Thank you

jellespijker commented 2 years ago

This command: conan config install https://github.com/ultimaker/conan-config throws an error about not being a zip file

Ah I see I should have add .git for the conan config install command, I have updated the previous comment

Regarding the sipbuildtool error, it seems to go wrong in this recipe: https://github.com/Ultimaker/conan-ultimaker-index/blob/22dd784939e8591666be40b0011668733bacbabf/recipes/sipbuildtool/conanfile.py

As I mentioned before we're changing a lot in the build process, it could be that an "older" recipe was being used. I have removed the sipbuildtool from the cura-ce remote and uploaded the latest. Can you check if it works after you did a: conan remove sipbuildtool -f. The following line needs to be executed again:

conan install . cura/5.1.0-beta+666@ultimaker/stable --build=missing --update -g VirtualPythonEnv

Make sure that you aren't doing this in an activated Virtual Python Environment, because you're correct. the sipbuildtool sets up a venv itself to install and use sip.

feiticeir0 commented 2 years ago

I get this when issuing the command (always had it)

conan profile new default --detect

`** WARNING: GCC OLD ABI COMPATIBILITY

Conan detected a GCC version > 5 but has adjusted the 'compiler.libcxx' setting to 'libstdc++' for backwards compatibility. Your compiler is likely using the new CXX11 ABI by default (libstdc++11).

If you want Conan to use the new ABI for the default profile, run:

$ conan profile update settings.compiler.libcxx=libstdc++11 default

Or edit '/home/feiticeir0/.conan/profiles/default' and set compiler.libcxx=libstdc++11


` I just go with the default.

I'm sorry, but I keep getting the same error as before. :(

jellespijker commented 2 years ago

The libcxx is altered by inheritance by our standard profiles, so now worries about that.

Can you give me a bit more information about your system. Like the Python and Conan version and the output of uname -a

feiticeir0 commented 2 years ago

The libcxx is altered by inheritance by our standard profiles, so now worries about that.

Can you give me a bit more information about your system. Like the Python and Conan version and the output of uname -a

Hi ! Thank you for your help.

Here's the info:

conan -v
Conan version 1.50.0
python -V
Python 3.10.5
uname -a
Linux nightcrawler 5.15.41-gentoo #14 SMP Fri Jul 1 16:31:03 WEST 2022 x86_64 AMD Ryzen 7 5700G with Radeon Graphics AuthenticAMD GNU/Linux
jellespijker commented 2 years ago

Can you copy past the full output of the install command?

feiticeir0 commented 2 years ago

Can you copy past the full output of the install command? Hi @jellespijker . Thank you for your patience.

What install command ? This one ? conan install . cura/5.1.0-beta+666@ultimaker/stable --build=missing --update -g VirtualPythonEnv

Does it saves it in a file ? I can output it to a file if it doesn't , and paste it here.

feiticeir0 commented 2 years ago

Here's the log - install_output.log

feiticeir0 commented 2 years ago

Hi !

I'm not seeing development on this and this is closed, but still I have a problem. Where can I open this issue again ? In here ?

rburema commented 2 years ago

@feiticeir0 ~Did you retry after you pulled the latest main? Quite a lot changed because of the PR mentioned.~ Oops, forgot for a moment that I wasn't looking at the Cura repo, sorry!

jellespijker commented 2 years ago

@feiticeir0 this repo has been deprecated, try building from Cura main, following the instructions on the wiki in the Cura repository. If you still have issues then create a new ticket in the ~Curb~ Cura repository. Also be aware that we are still fixing stuff there for the builds and development environment. We will work on this extensive the next month. So please be patient with us.

feiticeir0 commented 2 years ago

Curb

Hi @jellespijker ! Thank you for the reply ! I think you mean Cura and not curb. I will try and post any issues ! Thank you anyway for everthing. I'll be patient ! :)

jellespijker commented 2 years ago

Yes I meant Cura. Autocorrect on a phone isn't the easiest for Github issues. You should try writing a block of code 😉 it wants to capitalize everything.

feiticeir0 commented 2 years ago

Well, It worked. It build without any issue in Arch Linux. Thank you Packages installed: pacman -S libfontenc libice libsm libxaw libxcomposite libxcursor libxdamage libxdmcp libxtst libxinerama libxkbfile libxrandr libxres libxss libxvmc xtrans xcb-util-wm xcb-util-image xcb-util-keysyms xcb-util-renderutil libxxf86vm libxv xkeyboard-config xcb-util util-linux-libs ninja libfontenc libxcb