-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[raylib] build failure #15905
Comments
Host Environment
I don't know if this is the same or similar issue but if I try to add
I get a lot of unresolved external linker errors.
Strange though, that it does find the includes when compiling. |
Hi @heretique and @zipzit Thanks for posting this issue. The current usage is not correct. The variables are from vcpkg-cmake-wrapper.cmake, which has been removed from portfile.cmake, So the usage requires vcpkg-cmake-wrapper.cmake. I also tries to use raylib-confg.cmake to build, it failed with There are many errors in |
Could you please help test if the PR #15935 can build fine? @heretique and @zipzit |
Will do. I need a little bit of help though. I don't understand totally how to get your pull request branch into my local repository. I thought it was:
How do I pull that branch? I know I can just make the same changes and test that, but now I'm really curious... I never did this before. many thx for your work here... Hmm.. I went to https://github.com/NancyLi1013/vcpkg/tree/dev/NancyLi/fix-raylib and I realized that I could just clone that. |
-->
So one change I noticed here... in the above response, ${RAYLIB_INCLUDE_DIRS} went to ${raylib_INCLUDE_DIRS}, (capitalization) I made those changes to my CMakeLists.txt file
I still see an error in VS code after I attempt If it helps I can upload my CMakeLlsts.txt file and any of the other CMake generated files.. Again, many thanks for your help in fixing this. OUTPUT tab in VScode
CMakeLists.txt line #9 = |
I had the same initial issue which brought me here. I then cloned from NancyLi1013 via
|
Hi @heretique and @pkeir You might not get the correct changes from my branch. The usage should be like this:
|
You can do the following steps:
|
First delete the vcpkg directory, create the clone branch to
then:
lots of downloads, extracts, builds
CMake: Configure works well. (definitely different then last time...) CMake: Build, Definite fail. I've attached a file of the build response. First error line
zipzit raylib cmake build fail 6AM 1Feb2021.txt Nancy, thx for your efforts here. Definitely some progress made, not sure about the dlsym stuff Hmm.. as I think about this one, I'm not sure I tried a manual install of the raylib library. Its not clear if the errors noted are from the vcpkg manager or from raylib stuff itself. Give me a while to figure this out.. |
Could you please help provide your application? I try to use |
Sure, Here's my open source repo. As you can tell I'm trying to learn the right progression for using C/C++ on VS Code. Baby steps. Think CodeSandBox Simplicity for learning how-to build and run in C++ #1 thru #6 work fine. #7/#8 not so sure. I jumped over to #9, and that's where I'm working now. I'm working in a Ubuntu environment within Virtualbox. And I do realize, I have to stop and really learn the details on CMake. I'm a hacker there. I'm planning on spending a day playing with that so I understand whats going on. All the working files are just tossed on the desktop. If it helps I can throw the vagrant file here too, (although that's a bit messy..) https://github.com/zipzit/vscode_cpp_projects Many thanks for your efforts here... |
So I've spent a whole bunch of time on this stuff. When I installed raylib libraries from repo, things worked well. I wasn't happy with their instructions on Include/Link, but with a little bit of research I was able to figure this out. One thing the raylib install does is place the library and include files in best practice location automatically. In my case, Here is my manual raylib install CMakeLists.txt file:
Not nearly having such a fun time over at VCPKG install. I gotta say, these words drive me insane:
followed by:
When those four lines are added to my CMakeLists.txt file, things fail. The fail in different direction, but absolutely everything fails. Note, the -DCMAKE_TOOLCHAIN is converted to I gotta say, I came here to VCPKG to do a quick test on a library. And for other support libraries, it works perfectly (e.g. ZeroMQ stuff) For raylib, not so much, sigh. My expectation is that whatever the vcpkg install tells me, that's what I add to the CMakeLists.txt file and it performs. I will say... In the VCPKG overview it does require Visual Studio and instead I'm using VS Code, and it's possible therein lies a difference. But this hasn't been fun. If anyone wants to duplicate the test, I'll include my vagrant file so you can build the environment on your own in virtualbox. Note, there are some flaky things in the vagrant file depending on windows or Macos (shared folder stuff and Camera setup) But you can remark out the camera / shared folder stuff it should work just fine. Here's a vagrant file if anyone wants to test the unix stuff easily... One more note: When I do a
Don't get me wrong, I'm more then grateful for the support from the whole team here. The attempt is noble. But doggone there are a whole lot of open issues here within this repo. I would love to dig in and help, but Its just not clear to me on the concept of what the perfect vcpkg folder looks like. I'm totally lost understanding what the vcpkg.cmake script is trying to accomplish. None of this makes sense to me. At this point, raylib via VCPKG on a unix box is a fail. |
Hi @zipzit Thanks for looking into this and also for your time. In fact, vpkg has provided the usage for raylib:
So you just need to use it like this in your project , why do you set the path manually?
On Linux, vcpkg find headers and libs in path So I don't understand what your situation. |
Apologies for your confusion on this. That stuff was posted in direct response to my comment above:
When I manually install the raylib library from github source, it works great. The VCPKG stuff fails raylib each and every time, no matter what I do. You know, I provided my vagrant file so you can easily and quickly build the unix box on your computer and test it. When you run the vcpkg stuff for raylib on a unix box are you successful? Many thanks for your patience and efforts here. |
Thanks for your further investigation about this issue. I cannot reproduce it since there is no project case before this. And now, I have the same error as you posted above. Seems less to link |
The same error in #16047. Since the original issue for the usage has been fixed. Let's track the link issue there. |
Like @zipzit I also found that Raylib is now lowercase in |
Host Environment
./vcpkg version
-->Vcpkg package management program version 2021-01-13-unknownhash
To Reproduce
Steps to reproduce the behavior:
./vcpkg install raylib
response:
./vcpkg integrate install
response:
Error appears in the development tooling immediately.
Failure logs
[build] /home/vagrant/Desktop/vscode_cpp_projects/9_vcpkg_raylib/main.cpp:23:10: fatal error: raylib.h: No such file or directory
Additional context
Ouch. On Unix box, the directory tree is:
.../vcpkg/packages/raylib_x64-linux/include
(where all the .h files are located.) Unfortunately, as I peek in the CMakeCache.txt file, everything is pointing at:.../vcpkg/packages/raylib_x64-linux/debug/include...
.../debug/...
how did that get in there? The visible error isfatal error: raylib.h: No such file or directory
And I'm not comfortable enough with my CMake skills for a pull request on a fix within the raylib port. Its not clear to me on how this works. Its not clear to me on if the miss is in the intended structure or the directory path variables. At any rate those two things don't match each other.
Any hints as to how to fix this? many thanks.
The text was updated successfully, but these errors were encountered: