Package Details: ns 2.35-9

Git Clone URL: https://aur.archlinux.org/ns.git (read-only, click to copy)
Package Base: ns
Description: Discrete event simulator targeted at networking research
Upstream URL: http://www.isi.edu/nsnam/ns/
Licenses: GPL
Submitter: shaurz
Maintainer: Greenscreen23
Last Packager: Greenscreen23
Votes: 4
Popularity: 0.000000
First Submitted: 2006-03-17 01:52 (UTC)
Last Updated: 2024-09-27 15:17 (UTC)

Dependencies (5)

Required by (0)

Sources (7)

Latest Comments

1 2 Next › Last »

qrwteyrutiyoup commented on 2024-09-24 18:49 (UTC)

Hello @Greenscreen23. Apologies, but I am currently unable to do any work on this at the moment. I will disown the package so that you or someone else can update it.

Greenscreen23 commented on 2024-09-18 13:01 (UTC)

Hey :) I tried building it and got an error because the return type of random was int in ns and long int in the stdlib. I've created a patch to fix an issue in configure that caused this, you can add it to the list of patches if you want.

I've rarely worked with autoconf, so feel free to tell me if I'm doing something wrong. I did not fully regenerate the configure file, because my autoconf did a lot of changes that did not seem necessary.

diff --git a/configure b/configure
index 9031812..c02b3a0 100755
--- a/configure
+++ b/configure
@@ -7981,7 +7981,7 @@ else
 #include <stdlib.h>
 #include "confdefs.h"
 long random() { return 1; }
-main() { exit(0); }
+int main() { exit(0); }

 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
diff --git a/configure.in b/configure.in
index 3b15ba2..c03f829 100644
--- a/configure.in
+++ b/configure.in
@@ -52,7 +52,7 @@ touch confdefs.h
 AC_TRY_RUN([#include <stdlib.h>
 #include "confdefs.h"
 long random() { return 1; }
-main() { exit(0); }
+int main() { exit(0); }
 ],
 AC_MSG_RESULT(long)
 AC_DEFINE(RANDOM_RETURN_TYPE,long)

aetherherne commented on 2022-08-02 19:28 (UTC)

@qrwteyrutiyoup I can confirm that 2.35-9 builds correctly. Tested on two separate installations.

qrwteyrutiyoup commented on 2022-07-29 22:37 (UTC)

@aetherherne: could please you try 2.35-9?

aetherherne commented on 2022-07-29 20:01 (UTC)

This kept failing to build with gcc12, so I installed gcc5 from the AUR. After doing this I also added '!buildflags' to the PKGBUILD options array, and changed build() to:

build() {
  cd "${srcdir}"/"${pkgname}"-"${pkgver}"
  export CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fexceptions \
             -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security"
  export CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
  export LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
  export LTOFLAGS="-flto=auto"
  ./configure --prefix=/usr --with-tclcl=/usr/lib/tclcl --enable-static CC="gcc-5" CXX="g++-5"
  make
}

shadyabhi commented on 2011-10-02 16:58 (UTC)

If you get error like: mac/mac-802_11Ext.h: In member function ‘u_int32_t PHY_MIBExt::getHdrLen11()’: mac/mac-802_11Ext.h:176:19: error: expected primary-expression before ‘struct’ mac/mac-802_11Ext.h:176:41: error: ‘dh_body’ was not declared in this scope mac/mac-802_11Ext.h:176:51: error: ‘offsetof’ was not declared in this scope open that file and add #include <cstddef> to the header files.

crlf0710 commented on 2011-09-29 04:32 (UTC)

Please edit the PKGBUILD and add all the dependencies such as otcl tcl84 tk84 and so on, thanks

<deleted-account> commented on 2011-04-04 17:13 (UTC)

When I try to build, I get a compile error: tools/ranvar.cc: in member function `virtual double gammarandomvariable::value()': tools/ranvar.cc:219:70: error: cannot call constructor `GammaRandomVariable::GammaRandomVariable' tools/ranvar.cc:219:70: error: for a function-style cast, remove the redundant `::GaammaRandomVariable' make: *** [tools/ranvar.o] Error 1 ns make failed This is because GCC 4.5 does not like the X::X() style construct used in the NS2 source code and instead prefers the X() construct (according to http://forums.fedoraforum.org/archive/index.php/t-254937.html). Applying shadyabhi's patch solves the issue for me.

master commented on 2010-09-21 19:48 (UTC)

@shadyabhi Are you sure this wouldn't break the functionality?

shadyabhi commented on 2010-09-21 07:49 (UTC)

I successfully compiled after few changes. Author pls add this patch to PKGBIULD http://dl.dropbox.com/u/7728421/ns2.patch