-
Notifications
You must be signed in to change notification settings - Fork 196
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
Fix generation of protobuf files #74
Conversation
The files are now generated during build. Note: find_package now uses the cmake files provided by the Protobuf project and not the files from the CMake project, as the later cannot handle relative IMPORT_DIRS paths.
1f3a854
to
95a865f
Compare
After applying your patch, I am still getting: |
|
@a-andre, thank you for your quick answer. I have just built protobuf myself using CMake and the process was very straightforward. Now, the modules configured to be built are properly showing opengym. However, there are many new errors showing up during the ns-3 build process. I'm listing just the first three, as I believe they are somehow related to a mismatch of protobuf supported versions. What is the branch/tag of protobuf you have built?
|
You have to point My distribution provides Protobuf's CMake files, so I don't have to build it myself. Currently using Protobuf 21.12. |
Thank you for the quick reply @a-andre . I'm not sure where to look for in order to achieve that. Google did not help :( Could you please provide me additional information? Thank you in advance! I removed from my system the previously installed packages |
It seems Can you remove the generated If it still doesn't work, you can check if the correct protoc is used with adding the following after get_target_property(PROTOC_LOCATION protobuf::protoc LOCATION)
message("protoc location: ${PROTOC_LOCATION}") |
Thank you once again. Removing the generated protobuf messages fixed the building problems. I'm currently building ns-3 now to check if the patch fixes the problem and I can resume using ns3-gym with the recent ns-3 versions. I'll update you afterwards. After adding the message to the CMakeLists.txt file, the output was 0 lrwxrwxrwx 1 root root 15 Jan 5 10:09 /usr/local/bin/protoc -> protoc-3.21.4.0 |
See https://developers.google.com/protocol-buffers/docs/news/2022-05-06 for information about the versioning. |
A completely different error has now shown up during the build process. Below is a snippet of the error stack. Do you have any clue on what may be the issue now?
|
I haven't seen that issue before, maybe because I'm using the shared version (.so) of the protobuf library; the static version (.a) is not available on my system. |
Is there any way to build the source code of the protobuf library specifying the shared version of the library? Is this something I need to change in the CMakeLists.txt of ns3-gym? Not sure how to configure my system the same way as yours. Sorry for these dumb questions. It is the first time I am dealing with protobuf, and CMake troubleshooting, and the learning curve is a bit stiff! |
You can build protobuf with |
Unfortunately, when building with the flag you mentioned, I'm now getting the errors below. I noticed there are some related issues in the protobuf repo. I'll have a look into this in the upcoming days and try to get back if got any news.
|
I managed to build, ctest and install protobuf successfully now, however I am still not sucessfull with building ns3-gym.
|
Try this: git clone --recurse-submodules --branch v21.12 https://github.com/protocolbuffers/protobuf.git
cd protobuf
mkdir build
cd build
cmake -Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF ..
make
make install # might need root rights |
Sorry for the delay... I finally got ns3-gym working again. Thank you for the pull request, and for the patience to guide me through the issues I had. On top of your comment, i also had to do this here because of a missing file. I think this protobuf dependency install process should be properly documented for future users |
Hi, thanks for this patch! |
Hi guys, could I ask you to test a fresh installation of the app-ns-3.36+?? |
It works for me! |
The files are now generated during build.
Note:
find_package now uses the cmake files provided by the Protobuf project and not the files from the CMake project, as the later cannot handle relative IMPORT_DIRS paths.