Our VME system is somewhat old, running Scientific Linux 4.7. Unfortunately, I was never able to get a newer version of the operating system working with these computers.

I needed to compile a program on this system. And the first attempt gave me tons of errors:

[root@wahcrate koto]# gcc adclossless.c -o adclossless -lvme
In file included from /usr/include/stdio.h:28,
                 from adclossless.c:1:
/usr/include/features.h:1: error: stray '\31' in program
/usr/include/features.h:1: error: stray '\139' in program
/usr/include/features.h:1: error: stray '\8' in program
/usr/include/features.h:1: error: stray '\2' in program
/usr/include/features.h:1: error: stray '\3' in program

Since I can’t really update this program, my hack to get this working was to copy any header files that were causing errors from a different computer. I copied the following files from a system running Red Hat Enterprise Linux, version 5.

/usr/include/features.h
/usr/include/gconv.h
/usr/include/alloca.h
/usr/include/errno.h
/usr/include/fcntl.h
/usr/include/getopt.h

In case this caused any problems, I renamed the old files first to .OLD. Lastly, the compilation complained about the file /usr/include/endian.h not being present. So I copied that file too.

After that the compilation worked.

[root@wahcrate koto]# gcc adclossless.c -o adclossless -lvme
/tmp/cc5q5khk.o(.text+0x270): In function `main':
: warning: the `gets' function is dangerous and should not be used.

I was also able to start the program.

[root@wahcrate koto]# ./adclossless 

 *************************************************** 
 *****     Beam Test Program for FADC Board     **** 
 *************************************************** 

(Slot:4 type:"none")>>help


    Commands:   read 
    Commands:   write    < value> 
    Commands:   read_vme  slot_number address 
    Commands:   write_vme slot_number address value 

    Commands:   run lb  <2.5, 3.125> 
    Commands:   run dc  
    Commands:   run db  
    Commands:   run ec  
    Commands:   run rnt  

    Commands:   reset_reg     
    Commands:   set slot_number   <1-21>
    Commands:   show
    Commands:   Exit,exit,q 


(Slot:4 type:"none")>>q

Unfortunately, at this point, I have no idea if it will work, since I don’t know how to use it. I will wait and see if it works for the student.