Board.KolibriOS.org

Official KolibriOS board
It is currently Fri Sep 24, 2021 4:20 pm

All times are UTC+03:00




Post new topic  Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Wed Nov 18, 2009 6:40 am 
Offline
User avatar

Joined: Fri Oct 17, 2008 8:12 am
Posts: 3
I cant seem to get the Lib C for MenuetOS from here to compile on Ubuntu 9.10
Here is the output from GNOME Terminal

_________________
My KolibriOS WebSite ~ Rand Test


Top
   
PostPosted: Wed Nov 18, 2009 7:01 am 
Offline
User avatar

Joined: Fri Jun 27, 2008 3:22 pm
Posts: 988
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.


Top
   
PostPosted: Wed Nov 18, 2009 7:27 am 
Offline
User avatar

Joined: Fri Oct 17, 2008 8:12 am
Posts: 3
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.

_________________
My KolibriOS WebSite ~ Rand Test


Top
   
PostPosted: Wed Nov 18, 2009 9:27 am 
Offline
User avatar

Joined: Fri Jun 27, 2008 3:22 pm
Posts: 988
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:
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:
//#ifdef __GO32__
static int isspeciall(long double d, char *bufp);
//#endif


2.)
Code:
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:
/*static*/ void      tzsetwall(void);


3.)
Code:
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:
    if (*((const char *)ptr1++) != *((const char *)ptr2++))
      return length;


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



4.)

Code:
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:
#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!


Top
   
PostPosted: Wed Nov 18, 2009 12:11 pm 
Offline
User avatar

Joined: Fri Oct 17, 2008 8:12 am
Posts: 3
After doing the changes you said it compiled successfully. :D
Thanks very much for all your help. :D

_________________
My KolibriOS WebSite ~ Rand Test


Top
   
PostPosted: Wed Nov 18, 2009 6:34 pm 
Offline
Mentor
User avatar

Joined: Tue Jan 15, 2008 11:27 am
Posts: 756
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?


Top
   
PostPosted: Sun Nov 22, 2009 4:11 pm 
Offline
User avatar

Joined: Fri Jun 27, 2008 3:22 pm
Posts: 988
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: http://board.kolibrios.org/viewtopic.php?f=9&t=480


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 7 posts ] 

All times are UTC+03:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited