Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
96 user(s) are online (63 user(s) are browsing Forums)

Members: 1
Guests: 95

sailor, more...

Headlines

 
  Register To Post  

(1) 2 3 4 ... 9 »
New verson of CLiB2 from Andrea (afxgroup)
Home away from home
Home away from home


See User information
@All

Andrea made his version aval for everyone and this is deserve relevant topic for sure.

There this are:

https://github.com/afxgroup/clib2/commits/master

Check the README.md for full details of what is new


Edited by kas1e on 2022/3/21 18:48:49
Go to top
Re: New verson of CLiB2 from Andrea (afxgroup)
Amigans Defender
Amigans Defender


See User information
just added regex* POSIX functions

Go to top
Re: New verson of CLiB2 from Andrea (afxgroup)
Home away from home
Home away from home


See User information
@afxgroup

Awesome, can't wait for the first release

Go to top
Re: New verson of CLiB2 from Andrea (afxgroup)
Amigans Defender
Amigans Defender


See User information
added tgmath.h and some missing fixes.
For release i need first some feedback.
However you should be able to compile it without any problem (I hope..)

Go to top
Re: New verson of CLiB2 from Andrea (afxgroup)
Home away from home
Home away from home


See User information
@Andrea
Everythng looks cool, but the only one moment which a lttle bit worry me - is those changes about libunix. Was there real needs to remove it ? Because this "puttng .unix files insde of dirs" doesn't looks good for sure. Of course there "enableUnixPaths()" as you sau , and of better, but still libunix.a was kind of "easy support for unix pathes without touching a shit in the code" whle as it now, it a bit complecate the things.

Was there some real reassons for making it like that ?

Go to top
Re: New verson of CLiB2 from Andrea (afxgroup)
Amigans Defender
Amigans Defender


See User information
because you have to add always -lunix that is not standard at all and has always complicated the ports. Now with a single file in the dir you can enable the unix paths or better using enableUnixPaths(). I don't think you never change any line of code in a program (think about $STACK or VERSION for example).
I want a library that is standard as much as possible without specify any useless additional library.
Not only. You can test also program with and without unix paths at runtime (I still prefer always the OS4 paths way)

Go to top
Re: New verson of CLiB2 from Andrea (afxgroup)
Home away from home
Home away from home


See User information
@afxgroup
Quote:

Not only. You can test also program with and without unix paths at runtime


You mean by putting .unix file in ? Yeah, that can be handy for fast check indeed.

Quote:

(I still prefer always the OS4 paths way)


Everyone should prefer it of course :)

I tried to build what you have , and firstly found that there no usual "Makefile", but instead "GNUMakefile.os4". I read this done because "adtools" search for this one exactly, so it keeps like this for avoid issues with adtools, but maybe later if adtools will switch to your clib2, we can change it on pure Makefile for clean reassons ?


Next, tried to build it like "make -f GNUMakefile.os4", and have those kind of errors:

user@DESKTOP-3NFAB0O /amiga2/clib2-master
make -f GNUmakefile.os4
Assembling \033
[0;33m[build/lib]\033[0m \r\t\t\t\t\t\t\t\t \033[0;31mcrt0.o\033[0m
cp 
-./build/lib/crt0./usr/ppc-amigaos/SDK/clib2/lib/
cpcannot create regular file '/usr/ppc-amigaos/SDK/clib2/lib/'No such file or directory
make
: *** [GNUmakefile.os4:154build/lib/crt0.oError 1


That mean Makefile need some love ?:)

IMHO, if anyone run makefile without any options, it should doing just that : only compile code. No install, not "cp -r build", etc. Pure complation of files and libs. Then if anyone wish can use "make install" or whatever. As it now it looks strange, why it tried to copy anything without being asked for , it should compile code imho :)


Probabaly makefile need to be structured like this : firstly everything compiles in its own build directory, and only then, if one do "make install" copy the things. As of now it looks like it tries to compile something , and then immediately copy.

Makefile also have some hardcore patches like INSTALL_PREFIX = /usr/ppc-amigaos/SDK/clib2 and SDK_INCLUDE := /usr/ppc-amigaos/SDK/include, while most of time by default it's /usr/local/amiga/ppc-amigaos. But anyway there should't be any hardcore stuff, but probabaly after compilation done, should be something like "make install /usr/albaklalasd/ppc-amigaos/" etc.

Also i checke file "changes", and while it not that important as code in library, it still looks a bit broken too : you have there 2 times c.lib 2.001 , but with different dates, and in the middle you have c.lib 2.000 (xxx). Looks like unstructured chaos, imho :) Even syntax of notes a bit broken : (2021-02-08) vs (2021-03 25) (mising -). Sure all that not imporant enough, but if we want to make a good replacement, everytihng should be good, clean, and all pieces looks clean and without typos (or ppls will think that code also have typos).

Also "changes" file didn't have anything saying about libnix thing we discuss previously.


So to summorize : cosmetic in "changes" file, and issue with Makefile which is major one.


Edited by kas1e on 2022/3/22 10:34:36
Go to top
Re: New verson of CLiB2 from Andrea (afxgroup)
Amigans Defender
Amigans Defender


See User information
yeah many text files needs to be fixed... i have to find some time.. in the meanwhile i've added a file called POSIX.md where there is a list of POSIX includes. We have almost all of them. Of course this not means that everything is implemented (and correctly too..) but it is a step..

Go to top
Re: New verson of CLiB2 from Andrea (afxgroup)
Home away from home
Home away from home


See User information
@afxgroup

I see there were update to makefile, to not hardcode cross compiler path, where things just were replaced from "=" to "?=" , but how it supposed to work ? Should i run now makefile like "make -f GNUMakefile.os4 SDK_INCLUDE=my_path INSTALL_PREFIX=my_path" , or how ?

Anyway, i tried currently to replace in makefile on my paths, like:

INSTALL_PREFIX = /usr/local/amiga/ppc-amigaos/SDK/clib2
SDK_INCLUDE 
:= /usr/local/amiga/ppc-amigaos/SDK/include


And then "make -f GNUmakefile.os4", and still have error, there are the output:

Quote:

user@DESKTOP-3NFAB0O /amiga2/clib2-master
$ make -f GNUmakefile.os4
Assembling \033[0;33m[build/lib]\033[0m \r\t\t\t\t\t\t\t\t \033[0;31mcrt0.o\033[0m
cp -r ./build/lib/crt0.o /usr/local/amiga/ppc-amigaos/SDK/clib2/lib/
Compiling Static \033[0;33m[build/lib]\033[0m \r\t\t\t\t\t\t\t\t \033[0;31mcrtbegin.o\033[0m
cp -r ./build/lib/crtbegin.o /usr/local/amiga/ppc-amigaos/SDK/clib2/lib/
Compiling Static \033[0;33m[build/lib]\033[0m \r\t\t\t\t\t\t\t\t \033[0;31mcrtend.o\033[0m
cp -r ./build/lib/crtend.o /usr/local/amiga/ppc-amigaos/SDK/clib2/lib/
Compiling Static \033[0;33m[build/lib]\033[0m \r\t\t\t\t\t\t\t\t \033[0;31mshcrtbegin.o\033[0m
cp -r ./build/lib/shcrtbegin.o /usr/local/amiga/ppc-amigaos/SDK/clib2/lib/
Compiling Static \033[0;33m[build/lib]\033[0m \r\t\t\t\t\t\t\t\t \033[0;31mshcrtend.o\033[0m
cp -r ./build/lib/shcrtend.o /usr/local/amiga/ppc-amigaos/SDK/clib2/lib/
make: *** No rule to make target 'build/./build/lib/libc.so', needed by 'all-targets'. Stop.

user@DESKTOP-3NFAB0O /amiga2/clib2-master
$


Any idea wtf ?

Go to top
Re: New verson of CLiB2 from Andrea (afxgroup)
Amigans Defender
Amigans Defender


See User information
yes. for example

make -f GNUmakefile.os4 SDK_INCLUDE=/usr

Should override the SDK_INCLUDE variable. And you can see the compilation output removin @ from VERBOSE

However SDK_INCLUDE is useless for us since ppc-amigaos-gcc will search already in the SDK path. We could remove it

Regard your error it is strange because you have build/./build/ while it should be only ./build/ like for copy commands.

What os are you using to cross compile?

Go to top
Re: New verson of CLiB2 from Andrea (afxgroup)
Home away from home
Home away from home


See User information
@afxgroup

Quote:

Regard your error it is strange because you have build/./build/ while it should be only ./build/ like for copy commands.

What os are you using to cross compile?


As always for all those years : cygwin. First time seeing such errors so i assume GNUmakefile.os4 not robust enough. And not only because of this error but because it have another error : it didn't create dirs automatically.

What i mean is that : i create "/test" directory (so to install everything there) and once i run it this way:

make -f GNUmakefile.os4 SDK_INCLUDE=/usr/local/amiga/ppc-amigaos/SDK/include INSTALL_PREFIX=/test


i have then such error:

Quote:

user@DESKTOP-3NFAB0O /amiga2/clib2-master
$ make -f GNUmakefile.os4 SDK_INCLUDE=/usr/local/amiga/ppc-amigaos/SDK/include INSTALL_PREFIX=/test
Compiling Static \033[0;33m[build/lib]\033[0m \r\t\t\t\t\t\t\t\t \033[0;31mcrtend.o\033[0m
cp -r ./build/lib/crtend.o /test/lib/
cp: cannot create regular file '/test/lib/': Not a directory
make: *** [GNUmakefile.os4:164: build/lib/crtend.o] Error 1

user@DESKTOP-3NFAB0O /amiga2/clib2-master


Mean it didn't create "lib" directory in my new directory, while of course, it should be something like this in makefile : if we do not have necesary sub directory we create one then.


So there 2 issues : no creating of sub dirs if there is none, and that "build/./build/" which i assume issue in "libc.gmk".

ps. Also what about all those "\033[0;33m[build/lib]\033[0m \r\t\t\t\t\t\t\t\t \033[0;31mcrt0.o\033[0m" , they looks like they tries to use some specific escape characters not all terminals have ? Maybe worth to get rid of them too ? (or make them cross-platform, so to be ok and on os4 natively and on crosscompilers) ?

Go to top
Re: New verson of CLiB2 from Andrea (afxgroup)
Home away from home
Home away from home


See User information
@afxgroup
Its something with $(BUILD_DIR) for sure which is set in GNUmakefile.os4, and use $(LIB_ROOT). But for now can't understand wtf.

Even if i just set "BUILD_DIR = ./build" in GNUmakefile.os4, i have that "'build/./build/lib/libc.so'" constructed. But i i set BUILD_DIR for example for to "." or to ".a" , then i have that:

Quote:

11@mkdir -p .a/lib
make: 11@mkdir: No such file or directory


Wtf, this 11@mkdir and from where it comes .. There someting definately broken somewhere


ps. Just in case, i use Make 4.3


Quote:

However SDK_INCLUDE is useless for us since ppc-amigaos-gcc will search already in the SDK path. We could remove it


Tried without, and have that:

Quote:

user@DESKTOP-3NFAB0O /amiga2/clib2-master
$ make -f GNUmakefile.os4
Assembling \033[0;33m[build/lib]\033[0m \r\t\t\t\t\t\t\t\t \033[0;31mcrt0.o\033[0m
cp -r ./build/lib/crt0.o /lib/
Compiling Static \033[0;33m[build/lib]\033[0m \r\t\t\t\t\t\t\t\t \033[0;31mcrtbegin.o\033[0m
In file included from library/crtbegin.c:50:
./library/stdlib/stdlib_headers.h:81:10: fatal error: debug.h: No such file or directory
#include "debug.h"
^~~~~~~~~
compilation terminated.
make: *** [GNUmakefile.os4:156: build/lib/crtbegin.o] Error 1

user@DESKTOP-3NFAB0O /amiga2/clib2-master

Go to top
Re: New verson of CLiB2 from Andrea (afxgroup)
Amigans Defender
Amigans Defender


See User information
the problem is that cygwin works bad with addprefix. Basically it is adding BUILD_DIR twice.
I'm trying to fix it. In the meanwhile i've fixed ANSI codes. Just add -e to echo and remove /r and a some /t and everything will be printed correctly.

Go to top
Re: New verson of CLiB2 from Andrea (afxgroup)
Home away from home
Home away from home


See User information
@Afxgroup
Quote:

In the meanwhile i've fixed ANSI codes. Just add -e to echo and remove /r and a some /t and everything will be printed correctly.


Just adding of "-e " to all echo in main makefile do fix output, and there wasn't needs ot remove /r and /t , all seems ok.

It looks like this for me now:

make -f GNUmakefile.os4 SDK_INCLUDE=/usr/local/amiga/ppc-amigaos/SDK/include INSTALL_PREFIX=/test
Assembling 
[build/lib]                                           crt0.o
cp 
-./build/lib/crt0./test/lib/
Compiling Static [build/lib]                                     crtbegin.o
cp 
-./build/lib/crtbegin./test/lib/
Compiling Static [build/lib]                                     crtend.o
cp 
-./build/lib/crtend./test/lib/
Compiling Static [build/lib]                                     shcrtbegin.o
cp 
-./build/lib/shcrtbegin./test/lib/
Compiling Static [build/lib]                                     shcrtend.o
cp 
-./build/lib/shcrtend./test/lib/
make: *** No rule to make target 'build/./build/lib/libc.so'needed by 'all-targets'.  Stop.

user@DESKTOP-3NFAB0O /amiga2/clib2-master

Go to top
Re: New verson of CLiB2 from Andrea (afxgroup)
Amigans Defender
Amigans Defender


See User information
build/./build happens because addprefix makes strange stuff. i'm trying to compile gcc11 under cygwin because i use WSL since years and it has some problems. I'll keep you informed

Go to top
Re: New verson of CLiB2 from Andrea (afxgroup)
Home away from home
Home away from home


See User information
@afxgroup
Quote:

build/./build happens because addprefix makes strange stuff.

Strange that it only happes first time for me for years of different tests/ports/etc.. I just typed in google "addprefix cygwin issues" , and found nothing ..

Quote:

i'm trying to compile gcc11 under cygwin because i use WSL since years and it has some problems. I'll keep you informed


Yeah, it pretty easy to build (i have 3 different cygwin installs, one with 8.4.0, another with gcc10 and another with gcc 11.2). Just follow this guide : https://os4coding.net/blog/kas1e/how-b ... utils-2232-gcc-830-cygwin

Only change "gild/bin/gild checkout gcc 8" string on "gild/bin/gild checkout gcc 11"

Go to top
Re: New verson of CLiB2 from Andrea (afxgroup)
Amigans Defender
Amigans Defender


See User information
i have a problem with gettext.

i get this error:

In file included from /opt/adtools/binutils/repo/intl/plural.y:35:
/opt/adtools/binutils/repo/intl/plural-exp.h:102:23: error: conflicting types for ‘libintl_gettextparse’; have ‘int(void)’
102 | # define PLURAL_PARSE libintl_gettextparse
| ^~~~~~~~~~~~~~~~~~~~
/opt/adtools/binutils/repo/intl/plural.y:40:25: note: in expansion of macro ‘PLURAL_PARSE’
40 | # define __gettextparse PLURAL_PARSE
| ^~~~~~~~~~~~
plural.c:202:5: note: in expansion of macro ‘__gettextparse’
202 | int __gettextparse (void);
| ^~~~~~~~~~~~~~
/opt/adtools/binutils/repo/intl/plural-exp.h:102:23: note: previous declaration of ‘libintl_gettextparse’ with type ‘int(void *)’
102 | # define PLURAL_PARSE libintl_gettextparse
| ^~~~~~~~~~~~~~~~~~~~
/opt/adtools/binutils/repo/intl/plural-exp.h:114:12: note: in expansion of macro ‘PLURAL_PARSE’
114 | extern int PLURAL_PARSE PARAMS ((void *arg));
| ^~~~~~~~~~~~
/opt/adtools/binutils/repo/intl/plural-exp.h:102:23: error: conflicting types for ‘libintl_gettextparse’; have ‘int(void)’
102 | # define PLURAL_PARSE libintl_gettextparse
| ^~~~~~~~~~~~~~~~~~~~
/opt/adtools/binutils/repo/intl/plural.y:40:25: note: in expansion of macro ‘PLURAL_PARSE’
40 | # define __gettextparse PLURAL_PARSE
| ^~~~~~~~~~~~
plural.c:68:25: note: in expansion of macro ‘__gettextparse’
68 | #define yyparse __gettextparse
| ^~~~~~~~~~~~~~
plural.c:1044:1: note: in expansion of macro ‘yyparse’
1044 | yyparse (void)
| ^~~~~~~
/opt/adtools/binutils/repo/intl/plural-exp.h:102:23: note: previous declaration of ‘libintl_gettextparse’ with type ‘int(void *)’
102 | # define PLURAL_PARSE libintl_gettextparse
| ^~~~~~~~~~~~~~~~~~~~
/opt/adtools/binutils/repo/intl/plural-exp.h:114:12: note: in expansion of macro ‘PLURAL_PARSE’
114 | extern int PLURAL_PARSE PARAMS ((void *arg));
| ^~~~~~~~~~~~
plural.c: In function ‘libintl_gettextparse’:
plural.c:69:25: error: too few arguments to function ‘__gettextlex’
69 | #define yylex __gettextlex
| ^~~~~~~~~~~~
plural.c:1211:16: note: in expansion of macro ‘yylex’
1211 | yychar = yylex (&yylval);
| ^~~~~
plural.c:69:25: note: declared here
69 | #define yylex __gettextlex
| ^~~~~~~~~~~~
/opt/adtools/binutils/repo/intl/plural.y:69:12: note: in expansion of macro ‘yylex’

Go to top
Re: New verson of CLiB2 from Andrea (afxgroup)
Home away from home
Home away from home


See User information
@Andrea
That probabaly issues with too new lex or something, there is workarounds:

https://github.com/foss-for-synopsys-d ... sors/toolchain/issues/212

Go to top
Re: New verson of CLiB2 from Andrea (afxgroup)
Amigans Defender
Amigans Defender


See User information
it seems bison too new. But on cygwin repository i don't find versions older than 3.x

Go to top
Re: New verson of CLiB2 from Andrea (afxgroup)
Home away from home
Home away from home


See User information
Yeah that probablay bison.. but try to fix it like on url below, we at least it need one time for gcc build.


Edited by kas1e on 2022/3/25 5:37:08
Go to top

  Register To Post
(1) 2 3 4 ... 9 »

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project