Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Compiling MRTGEXT NLM with gcc under Linux

5 views
Skip to first unread message

ingrahamrw

unread,
Nov 21, 2006, 3:10:50 PM11/21/06
to
I apologize if this is old-hat to everyone, but after googling around for
days and searching through the Novell Developer site, I can't seem to get
a straight answer on how to properly build NLM's under Linux with the
current NDK and gcc and nlmconv.

My environment is SLES-8/SLES-9 and I have been able to build a simple NLM
following the fairly-out-of-date NLM-HOWTO. My target is NW 6.5.

I've also actually built the MRTGEXT NLM, but it took a lot of tweaking to
get it to compile.

Here are the problems:

1. This NLM includes header from both CLib and LibC and they don't seem to
play very well together. Lot's of duplicate definitions and, in some
instances, missing types (nuint64, anyone?)

2. I found an ABEND that we being caused by inkoking the vsprintf function
(using stdarg.h and friends.) I assume this is due to the differences in
pushing/popping args off the stack. For the moment, I'm not using the
stdarg functions until I can figure out a way around it. Is there a gcc
option that fixes this?

3. The call to the standard select() function (for a TCP socket it's
waiting on,) seems to fail everytime, the first time.

So, in searching through this forum, I've seen references to folks
building their NLM's with gcc and nlmconv under Linux. I've also seen old
references to a package called NLMStuff, but it doesn't seem to exist
anymore.

So, I have the following questions:

1. Why doesn't Novell seem to directly support building NLM's under SLES
with gcc? Or do they? (I mean, they are after all, the new Linux
champion on the block and the relatively new OES is Linux based, or so I
hear.)

2. If they do support native Linux/gcc development of NLM's, is there some
download I can obtain besides the Windows-targets NDK tarball that I've
already downloaded?

3. Failing that, is there some body of knowledge somewhere (a document,
FAQ, readme, or "kit") that describes how to properly build NLM's based
upon CLib/LibC under Linux with gcc?

Any pointers would be greatly appreciated!

Thanks,
Bob Ingraham


Alex Warmerdam

unread,
Nov 22, 2006, 4:32:24 PM11/22/06
to
D.d. Tue, 21 Nov 2006 20:10:50 GMT, bo...@netshel.net (ingrahamrw)
schreef het volgende:

>1. This NLM includes header from both CLib and LibC and they don't seem to
>play very well together. Lot's of duplicate definitions and, in some
>instances, missing types (nuint64, anyone?)

nuint64 is defined by compiler define statement.

>2. I found an ABEND that we being caused by inkoking the vsprintf function
>(using stdarg.h and friends.) I assume this is due to the differences in
>pushing/popping args off the stack. For the moment, I'm not using the
>stdarg functions until I can figure out a way around it. Is there a gcc
>option that fixes this?

Perhapse increase the stack size?


I do compile the nlm with metrowerks compiler, true that u have to
build an additional libc or clib library file to have it all in one.

On the part of compiling under linux, sorry can't help at this point.


0 new messages