[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 252
  • Last Modified:

nlmconv not working

Hi experts,
When I run the makefile:

CC = gcc
CFLAGS = -Wall -O2 -g -I/usr/include/ -I/usr/nwsdk/include/nlm/ -I/usr/nwsdk/include/ -nostdinc -fno-builtin -fpack-struct

hello.nlm:     hello.o hello.def
     nlmconv --output-target=nlm32-i386 -T hello.def

hello.o:     hello.c
     $(CC) $(CFLAGS) -c hello.c
I get the error:
nlmconv: hello.nlm: invalid bfd target
Can you help?
Thanks
Dkidd

0
dkidd
Asked:
dkidd
1 Solution
 
garbouaCommented:
:-)  add hello.o to end of line nlmconv --output-target, hello.def is an include file, and you need hello.o to build the netware load modules
0
 
dkiddAuthor Commented:
Hi
Thanks for your comment, I (with some help) managed to get nlmconv to work by running configure (for binutils) with the --enable-targets=all. Make then included nlmconv in the compilation process (before we just did make nlmconv).
However I want to sneak in a new problem.
I have created an nlm which copies one file to another using getc, It works on Linux but stops short copying a binary file on the Novell server. getc seems to find the EOF marker to early.
Can you help with this?
Thanks in advance
dkidd

0
 
garbouaCommented:
what kind of files are you copying, because there is a better way to copy a binary file than getc, and even if it is not, if you are just copying, then gets will grab the whole line. one step at a time, what are you copying?
0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
dkiddAuthor Commented:
Hi
I just copying one file to another, as a test I am copying an nlm to another file. It only copies the first 23 bytes of the file ie Netware Loadable Module, then stops when it gets to the first non printable character. I fear gets will have the same problem (does it use getc as well?).
Thanks
dkidd
0
 
dkiddAuthor Commented:
Hi Experts
Thanks for your comments, I am using read & write functions to copy. This detects EOF ok
Thanks again
dkidd
0
 
jmcgOwnerCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

PAQ with points refunded

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jmcg
EE Cleanup Volunteer
0
 
Computer101Commented:
PAQed, with points refunded (50)

Computer101
E-E Admin
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now