"Unexpected EOF within #IF, #ifdef or #ifndef" error when rebuilding / relinking SCO OpenServer 5


 
Thread Tools Search this Thread
Operating Systems SCO "Unexpected EOF within #IF, #ifdef or #ifndef" error when rebuilding / relinking SCO OpenServer 5
# 1  
Old 01-13-2015
Wrench "Unexpected EOF within #IF, #ifdef or #ifndef" error when rebuilding / relinking SCO OpenServer 5

Hi, I am a new Unix Guru with very little experience but have the task of P2Ving an old HP Proliant ML370 G5 server to VMware ESX 4.1 or ESXi 5.5.

System seems to boots fine but when trying to remove HP software, configure TCP/IP or a driver, I am receiving:

--------
Code:
  /var/opt/K/SCO/link/1.1.1Hw/etc/conf/pack.d/kernel/space.c: 918: Unexpected EOF within #if, #ifdef or #ifndef
  
 ERROR: /var/opt/K/SCO/link/1.1.1Hw/etc/conf/pack.d/kernel/space.c will not compile properly
  
 i386Id Driver.a fatal: Can't open file /var/opt/K/SCO/link/1.1.1Hw/etc/conf/pack.d/kernel/space.o for input
  
 ERROR: can not link-edit unix
  
 idbuild: idmkunix had errors
 system build failed

-------

Does anyone know what this means or how I can to troubleshoot this issue?

I can read / write to the folder, open the file and can't see anything unusual at the end of the file - line 918

I have also done a full disk check (fsck) too

Thanks in advance.
"Unexpected EOF within #IF, #ifdef or #ifndef" error when rebuilding / relinking SCO OpenServer 5-2015-01-13_152050jpg
"Unexpected EOF within #IF, #ifdef or #ifndef" error when rebuilding / relinking SCO OpenServer 5-2015-01-13_155028jpg
"Unexpected EOF within #IF, #ifdef or #ifndef" error when rebuilding / relinking SCO OpenServer 5-2015-01-13_154830jpg

Last edited by Don Cragun; 01-13-2015 at 01:22 AM.. Reason: Add CODE tags.
# 2  
Old 01-13-2015
The error is pretty clear. Somewhere in your code you have an #if, #ifdef, or #ifndef that does not have a matching #endif.

Show us the output from:
Code:
diff /var/opt/K/SCO/link/1.1.1Hw/etc/conf/pack.d/kernel/space.c /prior/version/of/space.c

(where /prior/version/of/space.c is the backup copy you made of that source file before you changed it) so we'll have a better chance of spotting the line you accidentally added or removed that is causing your problem. You did make a backup copy of the files you changed before you started editing them, didn't you?
# 3  
Old 01-13-2015
Thank you Don for your prompt reply, no I have not made any backup copies or duplicates of the source files. As attached is a picture of the file space.c with the date going back to Dec 2007.

Could it be because I am running in Single User Mode ? or unregistered SCO software?

Just tried again running in Init level 2 with the same symptoms.

what does the space.c and space.o files do?
"Unexpected EOF within #IF, #ifdef or #ifndef" error when rebuilding / relinking SCO OpenServer 5-2015-01-13_173019jpg
"Unexpected EOF within #IF, #ifdef or #ifndef" error when rebuilding / relinking SCO OpenServer 5-2015-01-13_174523jpg
"Unexpected EOF within #IF, #ifdef or #ifndef" error when rebuilding / relinking SCO OpenServer 5-2015-01-13_174543jpg
"Unexpected EOF within #IF, #ifdef or #ifndef" error when rebuilding / relinking SCO OpenServer 5-2015-01-13_175141jpg
"Unexpected EOF within #IF, #ifdef or #ifndef" error when rebuilding / relinking SCO OpenServer 5-2015-01-13_175517jpg

# 4  
Old 01-13-2015
It's quite likely that the HP software is not designed to be removable.
HP supply HBA drivers, NIC drivers and Server Health utilities.
The unregistered software message simply means that the SCO has not been notified of the installation.
Are you still working with the HP machine, or have you moved an image to the ESX ?
Can you do a screen print of the top half print 5. You can find this in /usr/adm/messages.
# 5  
Old 01-13-2015
Thank you JGT for your interest, I am also receiving the same behavior when trying to reconfigure the TCP /IP address for a native network driver (HW AMD PCNet-PCI Adapter)

Does SCO have the smarts to unregister itself once you move the system onto new hardware? I originally clone / P2V this system.

I am having these issues with the virtual machine only, The original physical is still working and in production but the key goal is to move into a virtual machine to reduce the hardware footprint.

Please find screen dump attached, which I think is going to help.
"Unexpected EOF within #IF, #ifdef or #ifndef" error when rebuilding / relinking SCO OpenServer 5-2015-01-14_121550jpg
# 6  
Old 01-13-2015
The only problem you may have with licensing is if you have used the same serial number on two machines on the same tcp subnet. If the first machine discovers the second machine, then one of the machines will display a message saying that the serial number is already in use, and shutdown.
Unless you have application software that is protected by having a file exist with its inode number saved in the file, then why not just do a fresh install on the virtual system, and copy the application and data from the production system.
I am assuming from the latest attachment that you are using 5.0.7.
Also, can you start "custom" and display the current installed software.
# 7  
Old 01-17-2015
Thanks JGT, I have kept both machines on an isolated network plus I am unable to get the TCP/IP stack working using the native OS driver on the virtual machine anyway due to this EOF issue with the /etc/conf/pack.d/kernel/space.c file when trying to compile the kernel. In my personal opinion / theory, I think it does have the smarts to detect different hardware and deactivates itself.

The reason for the P2V over migration was because I don't have skills to do it and we are unable to find a resource here in Sydney Australia that can assist with migrating the SCO and installed application across.

what is the space.c and space.o files?

thanks and I appreciate your patience.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

In awk: unexpected EOF while looking for matching `"'

I am trying to get grep with awk command into variable. But facing error. Could someone pls help. $ cat test_file DEPLOYMENT="abc" # com cluster="bcn" $ grep DEPLOYMENT test_file | awk -F "\"" '{ print $2 }' abc $ a=`echo "grep DEPLOYMENT test_file | awk -F \"\\\"\" '{ print $2 }'"` ;... (6 Replies)
Discussion started by: Manasa Pradeep
6 Replies

2. Shell Programming and Scripting

Unexpected EOF while loooking for matching '"

Hi everyone, I'm really new in shell scripting and having trouble resolving this error. Can someone please tell me why I'm getting these errors? Error Message: ./test.sh: line 50: unexpected EOF while looking for matching `'' ./test.sh: line 53: syntax error: unexpected end of file ... (4 Replies)
Discussion started by: simonirang
4 Replies

3. Shell Programming and Scripting

Help to resolve unexpected EOF while looking for matching `"' error

Hi, can someone kindly look into my copy script and figure out why am i getting a "unexpected EOF while looking for matching `"' error message #!/bin/ksh -x cd /home/goldenga/test/flag37 if ; then rm copied.ok cd /home/goldenga/test Upper=`ls -t|grep 'qw*'|cut -d "w" -f 2|head... (4 Replies)
Discussion started by: NDalal007
4 Replies

4. Shell Programming and Scripting

Unexpected EOF while looking for matching `"'

I have a piece of Linux script. It tells me some syntax error. I couldn't find it. Please help me to identify them. Thanks. The code looks like this: export ORACLE_SID=MYDB export SPW=`cat /opt/oracle/scripts/.sys_pw_$ORACLE_SID` export check_arch=`sqlplus -s << EOF / as sysdba... (7 Replies)
Discussion started by: duke0001
7 Replies

5. Shell Programming and Scripting

line 85: unexpected EOF while looking for matching `"'

hello everyone...im having this problem with unexpected EOF with line 85 which is..i cant see whats wrong with it..can any1 plz help me out. read -p "$p1 please enter the number of tries you wish to have:" lifeline function main() { guessnum=0 read -p "Please... (6 Replies)
Discussion started by: Freakhan
6 Replies

6. Shell Programming and Scripting

Unexpected EOF while looking for matching `"'

Hi everyone, I am trying to search for a string in a file that is partly made up of a variable. Here's the code: echo "parentCategory = $parentCategory" echo "parentCategoryFormatted = $parentCategoryFormatted" numUrlsFoundInParentCategory=`grep -c "<Topic r:id=\"Top\/World\/Français\/"... (2 Replies)
Discussion started by: BlueberryPickle
2 Replies

7. Shell Programming and Scripting

"unexpected end of file" when I´m use EOF inside block if

I have a trouble in my script when i use EOF inside block if. If i use EOF whitout block if I don´t have problem. Guys any ideas? Sorry for my terrible English. #!/bin/sh set -xv HOST='ftp.fiction.com.br' USER='fictionuser' PASS='fictionpass' FILE='ftpteste.txt' busca=`find... (4 Replies)
Discussion started by: ricardo.ludwig
4 Replies

8. Shell Programming and Scripting

"syntax error at line 21 :'done' unexpected." error message"

I am trying to run the script bellow but its given me "syntax error at line 20 :'done' unexpected." error message" can someone check to see if the script is ok? and correct me pls. Today is my first day with scripting. Gurus should pls help out #!/bin/ksh # Purpose: Check to see if file... (3 Replies)
Discussion started by: ibroxy
3 Replies

9. SCO

Plz. don't ignore this mail "Installing Tomcat 4.1.24.zip on Sco Openserver 5.0.2"

Hi Guys, I want ur replies very very Urgently.Plz. don't ignore this mail. I am using Sco openserver 5.0.2 and i have downloaded jdk1.2.2 for that i have installed it.The jdk is working fine. Then i download jakarta-tomcat-4.1.24.zip and i have installed it. In order... (1 Reply)
Discussion started by: ananthu_m
1 Replies
Login or Register to Ask a Question