compiling old C program in Linux.

Hello,
I am writing to ask for support about compiling an very old but famous C-progam for genetics study called MapMaker/QTL, and the source code is available from MIT:

http://www.broadinstitute.org/ftp/distribution/software/mapmaker3/

The program was originally designed for systems like SunOS SPARC station, Apple A/UX 3.0 and MS-DOS. I am trying to set it up in my Linux Box (Ubuntu 11.10 Ocelot), which seems never been tried before. When I searched the web there was only one try to port it for Mac OS,but there was no detail available and the links are dead.
This is very challenging to me! But it is a very popular program for genetic data analysis for crops breeding, especially for quantitative traits analysis. Another reason for me to re-compile it is for learning purpose as I am a beginner for C-programming.
Here are the errors I tried for my first step to get my feet wet. Obviously the errors are related to the library.

cc -I./lib/ -D_SYS_SUNOS -c lib/memlib.c -o lib/memlib.o
In file included from /usr/include/stdio.h:846:0,
                 from lib/system.h:519,
                 from lib/memlib.c:19:
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h:28:30: error: conflicting types for �sys_errlist�
lib/system.h:184:14: note: previous declaration of �sys_errlist� was here
In file included from lib/system.h:544:0,
                 from lib/memlib.c:19:
/usr/include/string.h:413:14: error: expected identifier or �(� before �int�
In file included from lib/memlib.c:19:0:
lib/system.h:596:5: error: conflicting types for �srandom�
/usr/include/stdlib.h:330:13: note: previous declaration of �srandom� was here
lib/memlib.c: In function �xalloc�:
lib/memlib.c:51:6: warning: format �%d� expects argument of type �int�, but argument 3 has type �size_t� [-Wformat]
lib/memlib.c:51:6: warning: format �%d� expects argument of type �int�, but argument 4 has type �size_t� [-Wformat]
lib/memlib.c:59:7: warning: format �%d� expects argument of type �int�, but argument 3 has type �size_t� [-Wformat]
lib/memlib.c:59:7: warning: format �%d� expects argument of type �int�, but argument 4 has type �size_t� [-Wformat]
make: *** [lib/memlib.o] Error 1

I appreciate if any body can help me look through it, although "who has anywhere from 15 minutes to a few days free" is needed to set it up as stated in the INSTALL.ME file with the package.

Thank you very much!

yifang

---------- Post updated at 07:04 PM ---------- Previous update was at 06:53 PM ----------

I happened to find this link for the "porting" of the program for MAC OS after I posted my question, which might be helpful. Thanks again! YF

http://ftp.kaist.ac.kr/macports/release/ports/science/mapm3/files/
cc -I./lib/ -D_SYS_SUNOS -c lib/memlib.c -o lib/memlib.o

Fairly sure you're not using sunos...

It gets a lot further if you change the makefile into -D_SYS_WATCOM, since one of the header files noted that it's practically ANSI. Still working on it.

---------- Post updated at 12:11 PM ---------- Previous update was at 09:24 AM ----------

I've gotten it to partially compile and try and use itself but makehelp segfaults.

"makehelp.c" contains a written apology from the programmer for its poor quality and excessive use of "globals and other ickiness." I may be in trouble. :wall:

---------- Post updated at 12:52 PM ---------- Previous update was at 12:11 PM ----------

tracking down pointer corruption, mumblegrumble...

1 Like