Coder Social home page Coder Social logo

Comments (13)

rukyr97 avatar rukyr97 commented on July 18, 2024 1

I am having the same problem.

from ns3-gym.

a-andre avatar a-andre commented on July 18, 2024

Could you test if #74 fixes the issue?

from ns3-gym.

pgawlowicz avatar pgawlowicz commented on July 18, 2024

Hi @a-andre and @rukyr97,

could I ask you to test a fresh installation of the app-ns-3.36+??

Thank you!

from ns3-gym.

a-andre avatar a-andre commented on July 18, 2024

Fresh installation builds without issues. (CMake 3.26, Protobuf 21.12)

from ns3-gym.

pgawlowicz avatar pgawlowicz commented on July 18, 2024

nice, thank you @a-andre !

from ns3-gym.

Shadab442 avatar Shadab442 commented on July 18, 2024

In my case fresh installation of ns-3.36.1/ns-3.37 does not work, I am using CMake 3.26 and Protobuf 3.20.3.

In ns-3.36.1 I get the following error when I configure the build:

CMake Error at /usr/share/cmake-3.26/Modules/FindProtobuf.cmake:493 (file):
file STRINGS file "/usr/include/google/protobuf/stubs/common.h" cannot be
read.
Call Stack (most recent call first):
contrib/ns3-gym/CMakeLists.txt:13 (find_package)

CMake Error at /usr/share/cmake-3.26/Modules/FindProtobuf.cmake:499 (math):
math cannot parse the expression: " / 1000000": syntax error, unexpected
exp_DIVIDE (2).
Call Stack (most recent call first):
contrib/ns3-gym/CMakeLists.txt:13 (find_package)

CMake Error at /usr/share/cmake-3.26/Modules/FindProtobuf.cmake:500 (math):
math cannot parse the expression: " / 1000 % 1000": syntax error,
unexpected exp_DIVIDE (2).
Call Stack (most recent call first):
contrib/ns3-gym/CMakeLists.txt:13 (find_package)

CMake Error at /usr/share/cmake-3.26/Modules/FindProtobuf.cmake:501 (math):
math cannot parse the expression: " % 1000": syntax error, unexpected
exp_MOD (2).
Call Stack (most recent call first):
contrib/ns3-gym/CMakeLists.txt:13 (find_package)

CMake Warning at build-support/3rd-party/colored-messages.cmake:81 (_message):
Protobuf compiler version 3.20.3; doesn't match library version
ERROR.ERROR.ERROR
Call Stack (most recent call first):
/usr/share/cmake-3.26/Modules/FindProtobuf.cmake:524 (message)
contrib/ns3-gym/CMakeLists.txt:13 (find_package)

CMake Error at build-support/custom-modules/ns3-module-macros.cmake:88 (add_library):
add_library ALIAS requires exactly one target argument.
Call Stack (most recent call first):
contrib/ns3-gym/CMakeLists.txt:40 (build_lib)

-- protobuf_generate command not found -> use a local copy from /home/blackjack/ns3-fresh/ns-3-allinone/ns-3.36.1/contrib/ns3-gym/protobuf-generate.cmake
CMake Error at build-support/3rd-party/colored-messages.cmake:78 (_message):
Error: protobuf_generate called without any targets or source
files
Call Stack (most recent call first):
contrib/ns3-gym/protobuf-generate.cmake:14 (message)
contrib/ns3-gym/CMakeLists.txt:62 (protobuf_generate)

CMake Error at build-support/3rd-party/colored-messages.cmake:78 (_message):
Error: protobuf_generate called without any targets or source
files
Call Stack (most recent call first):
contrib/ns3-gym/protobuf-generate.cmake:14 (message)
contrib/ns3-gym/CMakeLists.txt:69 (protobuf_generate)

In ns-3.37 I get this:

CMake Error at build-support/custom-modules/ns3-module-macros.cmake:76 (target_precompile_headers):
Cannot specify precompile headers for target "REUSE_FROM" which is not
built by this project.
Call Stack (most recent call first):
contrib/ns3-gym/CMakeLists.txt:40 (build_lib)

CMake Error at build-support/custom-modules/ns3-module-macros.cmake:94 (add_library):
add_library ALIAS requires exactly one target argument.
Call Stack (most recent call first):
contrib/ns3-gym/CMakeLists.txt:40 (build_lib)

-- Looking for protobuf_generate
-- Looking for protobuf_generate - not found
-- protobuf_generate command not found -> use a local copy from /home/blackjack/ns3-fresh/ns-3-allinone/ns-3.37/contrib/ns3-gym/protobuf-generate.cmake
CMake Error at build-support/3rd-party/colored-messages.cmake:78 (_message):
Error: protobuf_generate called without any targets or source
files
Call Stack (most recent call first):
contrib/ns3-gym/protobuf-generate.cmake:14 (message)
contrib/ns3-gym/CMakeLists.txt:62 (protobuf_generate)

CMake Error at build-support/3rd-party/colored-messages.cmake:78 (_message):
Error: protobuf_generate called without any targets or source
files
Call Stack (most recent call first):
contrib/ns3-gym/protobuf-generate.cmake:14 (message)
contrib/ns3-gym/CMakeLists.txt:69 (protobuf_generate)

Any suggestions?

from ns3-gym.

a-andre avatar a-andre commented on July 18, 2024

CMake Error at /usr/share/cmake-3.26/Modules/FindProtobuf.cmake:493 (file):
file STRINGS file "/usr/include/google/protobuf/stubs/common.h" cannot be read.

If you are on ubuntu, it seems you haven't installed libprotobuf-dev.

from ns3-gym.

Shadab442 avatar Shadab442 commented on July 18, 2024

After installing libprotobuf-dev I get the following errors:

CMake Error at scratch/CMakeLists.txt:54 (target_link_libraries):
Target "scratch_scratch-simulator" links to:

protobuf::libprotobuf

but the target was not found. Possible reasons include:

* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.

Call Stack (most recent call first):
scratch/CMakeLists.txt:67 (create_scratch)

CMake Error at scratch/CMakeLists.txt:54 (target_link_libraries):
Target "scratch_subdir_scratch-simulator-subdir" links to:

protobuf::libprotobuf

but the target was not found. Possible reasons include:

* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.

Call Stack (most recent call first):
scratch/CMakeLists.txt:97 (create_scratch)

Any insights?

from ns3-gym.

a-andre avatar a-andre commented on July 18, 2024

At first, please use code blocks.

I looks like you changed something in the scratch directory. If so, please let us know what you have changed.

Does everything build without issues if you remove the opengym directory from contrib/?

You might want to try ns-3.38 (or 3.39, which should be released within the next days).

from ns3-gym.

Shadab442 avatar Shadab442 commented on July 18, 2024

Sorry, next time I will use code blocks. Also, I have not changed anything in the Scratch directory. Also, everything builds without issues if I remove opengym. I will try with ns-3.38.

from ns3-gym.

Shadab442 avatar Shadab442 commented on July 18, 2024

With ns-3.38, I did not get any configuration or build error. Thanks for the help.

from ns3-gym.

Shadab442 avatar Shadab442 commented on July 18, 2024

After a fresh reinstallation, in ns-3.37, it is also working now. In ns-3.36.1, it gives the same error. Thank you for all your help.

from ns3-gym.

xxxxxy211 avatar xxxxxy211 commented on July 18, 2024

same question on ns3 3.36.1 for me. my sys is ubuntu20.and i changed ns3 to3.38 its ok.

from ns3-gym.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.