Menuet Lib C fails to compile on Ubuntu 9.10

Post here questions, problems and suggestions in English language
  • Your output seems to be not full. When I compiled libc by DJGPP the compile log was longer. Try to delete that file "/menuetlibc/src/libc/ansi/stdio/doprnt.o" and recompile libc if after that ar will not swear to doprnt.o and probably will on another *.o file then there was some files precompiled in the archieve and you would delete all such files and recompile libc.
  • Asper wrote:Your output seems to be not full. When I compiled libc by DJGPP the compile log was longer. Try to delete that file "/menuetlibc/src/libc/ansi/stdio/doprnt.o" and recompile libc if after that ar will not swear to doprnt.o and probably will on another *.o file then there was some files precompiled in the archieve and you would delete all such files and recompile libc.
    I dont have doprnt.o but I have doprnt.c

    I used XFCE Terminal this time and itgave me full output.
  • In the full log I've found 40 errors. I sugest maybe not very good but quick and simple solution for some errors.

    1.)

    Code: Select all

    doprnt.c:820: error: static declaration of ‘isspeciall’ follows non-static declaration
    doprnt.c:479: note: previous implicit declaration of ‘isspeciall’ was here
    For an unknown to me reason __GO32__ preprocessor constant wasn't defined (by your compiler?). So try to comment lines 66 and 68 in doprnt.c like this:

    Code: Select all

    //#ifdef __GO32__
    static int isspeciall(long double d, char *bufp);
    //#endif
    2.)

    Code: Select all

    ctime.c:97: error: static declaration of ‘tzsetwall’ follows non-static declaration
    /home/cooldude2k/Documents/LinDev/menuetlibc/include/time.h:90: note: previous declaration of ‘tzsetwall’ was here


    Comment static keyword on line 97 in ctime.c file like this:

    Code: Select all

    /*static*/ void		tzsetwall(void);
    3.)

    Code: Select all

    bcmp.c: In function ‘bcmp’:
    bcmp.c:17: error: lvalue required as increment operand
    bcmp.c:17: error: lvalue required as increment operand
    
    Your compiler don't like constructions like this:

    Code: Select all

        if (*((const char *)ptr1++) != *((const char *)ptr2++))
          return length;
    
    Try to change them to smth like this:

    Code: Select all

     
    if (*((const char *)ptr1) != *((const char *)ptr2))
          return length;
    ptr1++;
    ptr2++;
    

    4.)

    Code: Select all

    swab.c: In function ‘swab’:
    swab.c:13: error: lvalue required as increment operand
    swab.c:13: error: lvalue required as increment operand
    swab.c:13: error: lvalue required as increment operand
    swab.c:13: error: lvalue required as increment operand
    swab.c:16: error: lvalue required as increment operand
    swab.c:16: error: lvalue required as increment operand
    swab.c:16: error: lvalue required as increment operand
    swab.c:16: error: lvalue required as increment operand
    swab.c:16: error: lvalue required as increment operand
    swab.c:16: error: lvalue required as increment operand
    swab.c:16: error: lvalue required as increment operand
    swab.c:16: error: lvalue required as increment operand
    swab.c:16: error: lvalue required as increment operand
    swab.c:16: error: lvalue required as increment operand
    swab.c:16: error: lvalue required as increment operand
    swab.c:16: error: lvalue required as increment operand
    swab.c:16: error: lvalue required as increment operand
    swab.c:16: error: lvalue required as increment operand
    swab.c:16: error: lvalue required as increment operand
    swab.c:16: error: lvalue required as increment operand
    swab.c:17: error: lvalue required as increment operand
    swab.c:17: error: lvalue required as increment operand
    swab.c:17: error: lvalue required as increment operand
    swab.c:17: error: lvalue required as increment operand
    swab.c:17: error: lvalue required as increment operand
    swab.c:17: error: lvalue required as increment operand
    swab.c:17: error: lvalue required as increment operand
    swab.c:17: error: lvalue required as increment operand
    swab.c:17: error: lvalue required as increment operand
    swab.c:17: error: lvalue required as increment operand
    swab.c:17: error: lvalue required as increment operand
    swab.c:17: error: lvalue required as increment operand
    swab.c:17: error: lvalue required as increment operand
    swab.c:17: error: lvalue required as increment operand
    swab.c:17: error: lvalue required as increment operand
    swab.c:17: error: lvalue required as increment operand
    
    

    Code: Select all

    #define	STEP	temp = *((const char *)from++),*((char *)to++) = *((const char *)from++),*((char *)to++) = temp
    
    I don't understand exactly what does this code do. So I can't correctly change it. Maybe smbd else could help you on this, or you can solve it yourself.
    Good luck!
    [/color]
  • After doing the changes you said it compiled successfully. :D
    Thanks very much for all your help. :D
  • I also want to thank to all. Now I understand some nuances. But I have yet another question. Does exist libc for KOS that supports console.obj for printf and 70 sys.func. for fprintf?
  • Albom
    There is no special libc library that supports console.obj for printf function, but you can write a wrapper on con_printf and call it printf_ for example or better import it using such name. As far as I know diamond's libc use 70th function for all file operations. There is special theme for libc here: viewtopic.php?f=9&t=480
  • Who is online

    Users browsing this forum: No registered users and 18 guests