Coder Social home page Coder Social logo

Comments (9)

tbarbette avatar tbarbette commented on May 20, 2024

You need to give a few parameters to configure to build for ns3. Here you're compiling for a Kernel module ;)

from click.

tomhenderson avatar tomhenderson commented on May 20, 2024

You need to give a few parameters to configure to build for ns3. Here you're compiling for a Kernel module ;)

Sorry, I simplified for the issue report. Here are the arguments being passed to configure:

./configure --disable-linuxmodule --enable-nsclick --enable-wifi

It results in the same error. This configuration works on earlier Ubuntu, but not on Ubuntu 21.04.

from click.

sriharshAmur avatar sriharshAmur commented on May 20, 2024

Has anybody found a solution for this? I'm facing the same issue

from click.

kyechou avatar kyechou commented on May 20, 2024

The above workaround works for me too (Arch Linux, kernel 5.17.8, GCC 12.1.0).

Workaround: The below patch works for me on this system; have not checked other systems.

diff --git a/include/click/cxxprotect.h b/include/click/cxxprotect.h
index 65662aff7..f199df45a 100644
--- a/include/click/cxxprotect.h
+++ b/include/click/cxxprotect.h
@@ -9,7 +9,6 @@
 # define public                linux_public
 # define namespace     linux_namespace
 # define false         linux_false
-# define true          linux_true
 #endif
 
 #ifndef CLICK_CXX_PROTECT

from click.

botbotty avatar botbotty commented on May 20, 2024

Same error on Ubuntu 22.04

The problem seems to be with # include <netinet/in.h> inside ./include/clicknet/ip.h

If I add #undef true right before # include <netinet/in.h>, the compilation error disappears. It doesn't work if I add it after the include statement.

from click.

tbarbette avatar tbarbette commented on May 20, 2024

Is there a way to do that so it works also on old system without the define true? I think the define in netinet/in.h should be found at configure time and then expose the true or not according to the result of that.

What are your compile flags so I can try?

from click.

yxxu avatar yxxu commented on May 20, 2024

@tomhenderson
dear tomhenderson, how do you correct? I meet same error on ubuntu 22.04

from click.

kyechou avatar kyechou commented on May 20, 2024

Hi @tbarbette, the build is still broken for me with #502. Here's the complete build output: https://pastebin.com/TsUtmApV.

$ ./configure --prefix=/usr --sbindir=/usr/bin --enable-all-elements
$ make -j1
...
  CREATE elements.mk
  CXX ../lib/userutils.cc
  CXX ../elements/ip6/addresstranslator.cc
  CXX ../elements/ip6/icmp6error.cc
  CXX ../elements/ip6/ip6routetable.cc
  CXX ../elements/ip6/lookupip6route.cc
  CXX ../elements/ip6/markip6header.cc
  CXX ../elements/ip6/protocoltranslator64.cc
  CXX ../elements/ip6/setip6address.cc
  CXX ../elements/ip6/protocoltranslator46.cc
  CXX ../elements/ip6/setip6dscp.cc
  CXX ../elements/ip/checkipheader2.cc
In file included from ../include/clicknet/ip6.h:6,
                 from ../include/clicknet/icmp6.h:4,
                 from ../elements/ip6/icmp6error.cc:19:
../include/click/cxxprotect.h:12:25: error: ‘linux_true’ was not declared in this scope
   12 | # define true           linux_true
      |                         ^~~~~~~~~~

It looks like we need to do the same thing for include/clicknet/ip6.h, which I assume is not enabled for Ubuntu?
But wouldn't it make more sense to fix the issue by including or defining/adding macro checks in include/click/cxxprotect.h directly, instead of modifying all the other files that include that file?

from click.

tbarbette avatar tbarbette commented on May 20, 2024

Ah yes I did not try with ip6.
Yes it would be great but I could not find what to check in the incriminated file, nor exactly where is the clashing use...

from click.

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.