Thread View: news.software.nntp
5 messages
5 total messages
Started by Daniel Salama
Thu, 02 May 1996 00:00
Compiling INN
Author: Daniel Salama
Date: Thu, 02 May 1996 00:00
Date: Thu, 02 May 1996 00:00
18 lines
1447 bytes
1447 bytes
[ Note: This question was sent to inn-questions@pilhuhn.de and is posted] [ here, so that someone will see and answer it. Please email your ] [ answer to the original author in addition to posting it. ] I have been trying to compile INN but I keep getting errors! I am now at a point where when I compile nnrp but it is halting when looking for "nlist". I looked at loadave.c and it is looking for <nlist.h> but I cannot find this anywhere in the entire distribution of INN. If you have any suggestions or if I need to download an additional package, please let me know as soon as possible. Thank you for your attention, Daniel Salama International Network Corporation of America dsalama@trianet.net
Re: Compiling INN
Author: Jonathan Chen
Date: Sun, 05 May 1996 00:00
Date: Sun, 05 May 1996 00:00
14 lines
1109 bytes
1109 bytes
In <31892C4D.5B3C@trianet.net> Daniel Salama <dsalama@trianet.net> writes:
>I have been trying to compile INN but I keep getting errors! I am now at
>a point where when I compile nnrp but it is halting when looking for
>"nlist". I looked at loadave.c and it is looking for <nlist.h> but I
>cannot find this anywhere in the entire distribution of INN.
If you do a "man nlist" you may find out additional libraries you
have to link with to produce the executable.
--
char *p="char *p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
Re: Compiling INN
Author: Brent O'Keeffe
Date: Mon, 06 May 1996 00:00
Date: Mon, 06 May 1996 00:00
35 lines
1964 bytes
1964 bytes
In article <31892C4D.5B3C@trianet.net>, Daniel Salama <dsalama@trianet.net> wrote: >I have been trying to compile INN but I keep getting errors! I am now at >a point where when I compile nnrp but it is halting when looking for >"nlist". I looked at loadave.c and it is looking for <nlist.h> but I >cannot find this anywhere in the entire distribution of INN. If you have >any suggestions or if I need to download an additional package, please >let me know as soon as possible. I had the same problem during the compile. I never did find the correct fix for this problem, but I did find a work-around. The problem arises when loadave.c looks for nlist.h (as you said). The trick is that this procedure is only called if there is a load limit set for nnrpd. This feature allows a cuttoff point at which new nnrp's will be spawned, to prevent overloading the server. Since we are a relatively small site, we have no need for this feature. To disable this feature, edit your config.data and change the cooresponding line to: NNRP_LOADLIMIT -1 This will allow nnrp to succesfully compile without the load limit feature. I would still like to find the correct patch here, since this is only a minor workaround. Brent O'Keeffe Unix System Administrator Computer Services, Eastern New Mexico University Portales, New Mexico Ph - (505) 562-2694 Fax - (505) 562-2766
Re: Compiling INN
Author: Miquel van Smoorenburg
Date: Tue, 07 May 1996 00:00
Date: Tue, 07 May 1996 00:00
72 lines
2486 bytes
2486 bytes
In article <4mlnmi$6ep@sahara.enmu.edu>,
Brent O'Keeffe <Brent.OKeeffe@enmu.edu> wrote:
>In article <31892C4D.5B3C@trianet.net>,
> Daniel Salama <dsalama@trianet.net> wrote:
>>I have been trying to compile INN but I keep getting errors! I am now at
>>a point where when I compile nnrp but it is halting when looking for
>>"nlist". I looked at loadave.c and it is looking for <nlist.h> but I
>
>I had the same problem during the compile. I never did find the correct fix
>for this problem
If this is for Linux (which I suspect) then here is a diff (from my
inn1.4unoff4 debian package):
diff -ruN inn-1.4unoff4.orig/nnrpd/loadave.c inn-1.4unoff4/nnrpd/loadave.c
--- inn-1.4unoff4.orig/nnrpd/loadave.c Fri Jan 29 17:51:58 1993
+++ inn-1.4unoff4/nnrpd/loadave.c Sun Apr 7 16:17:07 1996
@@ -3,6 +3,36 @@
*/
#include "nnrpd.h"
#if NNRP_LOADLIMIT > 0
+
+#ifdef __linux__
+
+/*
+** Get the current load average as an integer.
+*/
+int
+GetLoadAverage()
+{
+ int fd, n;
+ char buf[16];
+ double avenrun;
+ char *s;
+
+ if ((fd = open("/proc/loadavg", O_RDONLY)) < 0)
+ return 0;
+ n = read(fd, buf, sizeof(buf) - 1);
+ close(fd);
+ if (n < 0) return 0;
+ buf[n] = 0;
+ if ((s = strchr(buf, ' ')) != NULL)
+ *s = 0;
+ sscanf(buf, "%lf", &avenrun);
+
+ return (int)(avenrun + 0.5);
+}
+
+#else /* __linux__ */
+
+
#include <nlist.h>
STATIC struct nlist NameList[] = {
{ "_avenrun" },
@@ -55,4 +85,7 @@
return (int)(avenrun[0] + 0.5);
#endif /* defined(FSCALE) */
}
+
+#endif /* __linux__ */
+
#endif /* NNRP_LOADLIMIT > 0 */
Mike.
--
Miquel van | Cistron Internet Services -- Alphen aan den Rijn.
Smoorenburg, | mailto:info@cistron.nl http://www.cistron.nl/
miquels@het.net | Tel: +31-172-419445 (Voice) 430979 (Fax) 442580 (Data)
Re: Compiling INN
Author: Alan Brown
Date: Tue, 07 May 1996 00:00
Date: Tue, 07 May 1996 00:00
59 lines
3267 bytes
3267 bytes
In article <31892C4D.5B3C@trianet.net>, Daniel Salama <dsalama@trianet.net> wrote: >[ Note: This question was sent to inn-questions@pilhuhn.de and is posted] >[ here, so that someone will see and answer it. Please email your ] >[ answer to the original author in addition to posting it. ] I'm not going to do this because I think that I may introduce more confusion for an INN newbie >I have been trying to compile INN but I keep getting errors! I am now at >a point where when I compile nnrp but it is halting when looking for >"nlist". I looked at loadave.c and it is looking for <nlist.h> but I I got this too when i updated my Linux to the latest set of libraries. (ELF, series 5 libraries and the latest series 4 libraries for a.out binaries, all running on 1.3.98, on what was originally a Slackware 2.2 vanilla machine.) What I find more worrying is that nlist appears to be looking at kernel symbols (I'm no programmer, so I'm just guessing from what's there) by looking at the entire kernel. Where this falls down is that the Linux kernel isn't normally called "vmunix" which is the default file searched if the platform isn't HP-UX or SunOs5.x but is "vmlinuz" or "zImage" and is a compressed kernel. One cannot boot a modern Linux system on an uncompressed kernel - it's simply too big to fit in the space available. (mine is 950kb for example) I've compiled an uncompressed vmlinux, ln'd to vmunix to keep the nlist function happy, but I'm still failing to compile nnrpd due to this call in loadave.c. A better cure would be to find the missing includes as well as dealing with the different kernel name. The first should be easy, but the second is going to be a job for an experienced Linux kernel hacker because of the compressed image factor. Havig said that, I believe there's an umcompressed kernel and kcore sitting in the /proc virtual filesystem which may be more practical to use. Anyone have any ideas? I can futz loadave.c by commenting out the nlist call and there appears to be no problem with the resulting nnrpd's, though I ended up with major problems when I tried to compile in the shared-active patch. (silent processes when people connected and 200 nnrpd's doing nothing.) There's no nlist or nlist.h man page for Linux, nor can I find any nlist modules in any includes directories. AB -- "But you can't say they have arrived to classify your nervous lies What's right, what's not, what may not be. Don't try your tricky tests on me For I won't live in fear my friend - that every day could be my end"
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads