Re: [Tinycc-devel] Building sudo?

2020-11-30 Thread Sudipto Mallick
Interesting project.
Because you're building the smallest possible usable system, I'd
suggest using a port of OpenBSD doas(1) e.g.
https://github.com/slicer69/doas .
doas is smaller, simpler alternative of sudo. I think it suits your
project well.
Also, a salute to you for building an OS using tinycc.

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] Building sudo?

2020-11-30 Thread James Mills
Don't be surprised :D

Im built this system from scratch (https://github.com/prologic/ulinux)

Basically the build system consists of just tcc and make. I was able to get
musl libc in the mix too, but quite a few things I had to build on a
separate host system to bootstrap the system.

Anything in the ./pkgs/ directory has to be bootstrapped on a host system.

Everything in ./ports/ is able to be built on a running uLInux system
itself.

My original goal was to build the smallest possible useable Linux, it
actually started out as a fork of Minimal LInux Live (you may have heard of
it?) then quickly turned into Minimal Container Linux (
https://github.com/prologic/minimcal-container-linux) and now uLinux (
https://github.com/prologic/ulinux).

The idea  is still to have the smallest possible useable system, so this
means shoving in binutils and all manner of GNU software is out-of-scope as
it tends to be rather fat and bloated :)

Are you starting to see the picture? Fortunately uLInux is capable of
running containers though including Docker and a custom container system
called box so I can actually build things in a container then copy the
artifacts to the host.

cheers

James

James Mills / prologic

E: prolo...@shortcircuit.net.au
W: prologic.shortcircuit.net.au
Blog:  Read my Blog <https://prologic.blog/>
Twtxt: Follow me on twtxt.net <https://twtxt.net/user/prologic>


On Sun, Nov 29, 2020 at 11:37 PM Christian Jullien  wrote:

> I’m beginning to understand your problem, you need ar and no one is
> present (or found).
>
> Questions:
>
> -  What is exactly your build system? Linux family , version, etc…
>
> -  Why can’t you install binutils which contains ld, ar and such?
>
> -  Sometimes, ar is called gar or gcc-ar or llvmar, sometimes it
> is also a link like: /usr/bin/ar -> arm-linux-gnueabihf-ar
>
>
>
> I’ll be surprised if your system has no ar already installed.
>
>
>
> C.
>
>
>
> *From:* Tinycc-devel [mailto:tinycc-devel-bounces+eligis=
> orange...@nongnu.org] *On Behalf Of *James Mills
> *Sent:* Sunday, November 29, 2020 12:45
> *To:* jull...@eligis.com; tinycc-devel@nongnu.org
> *Subject:* Re: [Tinycc-devel] Building sudo?
>
>
>
> But just to be sure, I did it again by hand just like what you described
>
>
>
> => https://gist.github.com/prologic/8b3b6bff539a1f070e145200c33c971a
>
>
>
> Perhaps as you suggested we make tcc ignore some flags?
>
>
> James Mills / prologic
>
> E: prolo...@shortcircuit.net.au
>
> W: prologic.shortcircuit.net.au
>
> Blog:  Read my Blog <https://prologic.blog/>
>
> Twtxt: Follow me on twtxt.net <https://twtxt.net/user/prologic>
>
>
>
>
>
> On Sun, Nov 29, 2020 at 9:41 PM James Mills 
> wrote:
>
> That doesn't work :/
>
>
>
> ./configure  is expecting to find an `ar` utility
>
>
>
> => https://gist.github.com/prologic/91c8be731d45446bc40987958ee75403
>
>
>
> cheers
>
> James
>
>
> James Mills / prologic
>
> E: prolo...@shortcircuit.net.au
>
> W: prologic.shortcircuit.net.au
>
> Blog:  Read my Blog <https://prologic.blog/>
>
> Twtxt: Follow me on twtxt.net <https://twtxt.net/user/prologic>
>
>
>
>
>
> On Sun, Nov 29, 2020 at 12:06 AM Christian Jullien 
> wrote:
>
> Can you try:
>
>
>
> $ (unalias ar; CC=tcc ./configure --enable-shared=no)
>
>
>
> *From:* Tinycc-devel [mailto:tinycc-devel-bounces+eligis=
> orange...@nongnu.org] *On Behalf Of *James Mills
> *Sent:* Saturday, November 28, 2020 12:44
> *To:* jull...@eligis.com; tinycc-devel@nongnu.org
> *Subject:* Re: [Tinycc-devel] Building sudo?
>
>
>
> I did and it fails the same way.
>
>
>
> cheers
>
>
>
> James
>
>
> James Mills / prologic
>
> E: prolo...@shortcircuit.net.au
>
> W: prologic.shortcircuit.net.au
>
> Blog:  Read my Blog <https://prologic.blog/>
>
> Twtxt: Follow me on twtxt.net <https://twtxt.net/user/prologic>
>
>
>
>
>
> On Sun, Nov 22, 2020 at 3:43 AM Christian Jullien 
> wrote:
>
> James,
>
> Have you tried "CC=tcc ./configure --enable-shared=no" as I said.
> It works ROOTB with sudo-1.9.3p1.tar.gz on both arm (RPi) and x64
>
> w.o. --enable-shared=no it fails because tcc does not support or recognize
> -Wl,--version-script, maybe tcc should simply ignore this option.
>
> -Original Message-
> From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=
> orange...@nongnu.org] On Behalf Of Michael Matz
> Sent: Friday, November 20, 2020 20:37
> To: tinycc-devel@nongnu.org
> Subject: Re: [Tinycc-devel] Building sudo?
>
> Hello,
>
> On Fri, 20 Nov 2020, 

Re: [Tinycc-devel] Building sudo?

2020-11-29 Thread Christian Jullien
I’m beginning to understand your problem, you need ar and no one is present (or 
found).

Questions:

-  What is exactly your build system? Linux family , version, etc…

-  Why can’t you install binutils which contains ld, ar and such?

-  Sometimes, ar is called gar or gcc-ar or llvmar, sometimes it is 
also a link like: /usr/bin/ar -> arm-linux-gnueabihf-ar

 

I’ll be surprised if your system has no ar already installed.

 

C.

 

From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] On 
Behalf Of James Mills
Sent: Sunday, November 29, 2020 12:45
To: jull...@eligis.com; tinycc-devel@nongnu.org
Subject: Re: [Tinycc-devel] Building sudo?

 

But just to be sure, I did it again by hand just like what you described

 

=> https://gist.github.com/prologic/8b3b6bff539a1f070e145200c33c971a

 

Perhaps as you suggested we make tcc ignore some flags?



James Mills / prologic

E:  <mailto:prolo...@shortcircuit.net.au> prolo...@shortcircuit.net.au

W:  <mailto:https://prologic.shortcircuit.net.au> prologic.shortcircuit.net.au

Blog:   <https://prologic.blog/> Read my Blog

Twtxt:  <https://twtxt.net/user/prologic> Follow me on twtxt.net

 

 

On Sun, Nov 29, 2020 at 9:41 PM James Mills  
wrote:

That doesn't work :/

 

./configure  is expecting to find an `ar` utility

 

=> https://gist.github.com/prologic/91c8be731d45446bc40987958ee75403

 

cheers

James



James Mills / prologic

E:  <mailto:prolo...@shortcircuit.net.au> prolo...@shortcircuit.net.au

W:  <mailto:https://prologic.shortcircuit.net.au> prologic.shortcircuit.net.au

Blog:   <https://prologic.blog/> Read my Blog

Twtxt:  <https://twtxt.net/user/prologic> Follow me on twtxt.net

 

 

On Sun, Nov 29, 2020 at 12:06 AM Christian Jullien  wrote:

Can you try:

 

$ (unalias ar; CC=tcc ./configure --enable-shared=no)

 

From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis 
<mailto:tinycc-devel-bounces%2Beligis> =orange...@nongnu.org] On Behalf Of 
James Mills
Sent: Saturday, November 28, 2020 12:44
To: jull...@eligis.com; tinycc-devel@nongnu.org
Subject: Re: [Tinycc-devel] Building sudo?

 

I did and it fails the same way.

 

cheers

 

James



James Mills / prologic

E:  <mailto:prolo...@shortcircuit.net.au> prolo...@shortcircuit.net.au

W:  <mailto:https://prologic.shortcircuit.net.au> prologic.shortcircuit.net.au

Blog:   <https://prologic.blog/> Read my Blog

Twtxt:  <https://twtxt.net/user/prologic> Follow me on twtxt.net

 

 

On Sun, Nov 22, 2020 at 3:43 AM Christian Jullien  wrote:

James,

Have you tried "CC=tcc ./configure --enable-shared=no" as I said.
It works ROOTB with sudo-1.9.3p1.tar.gz on both arm (RPi) and x64

w.o. --enable-shared=no it fails because tcc does not support or recognize 
-Wl,--version-script, maybe tcc should simply ignore this option.

-Original Message-
From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis 
<mailto:tinycc-devel-bounces%2Beligis> =orange...@nongnu.org] On Behalf Of 
Michael Matz
Sent: Friday, November 20, 2020 20:37
To: tinycc-devel@nongnu.org
Subject: Re: [Tinycc-devel] Building sudo?

Hello,

On Fri, 20 Nov 2020, James Mills wrote:

> Are you saying if I don't alias ar to tcc -ar it will build?

If you have another POSIX compatible ar, I suspect so, yes.

> What am I missing? I need to alias ar to tcc -ar for other builds to 
> work :)

Well, it seems that sudo, as part of its default build process, wants to 
extract archives it built itself.  tcc -ar simply is incapable of that (right 
now), it only supports creating archives.  So, if you don't want to hack sudo's 
build system then you need an 'ar' that can extract archives. 
If you then do have such 'ar' (in $PATH), then not aliasing 'ar' to 'tcc -ar' 
will do the right thing.

If you don't have any such 'ar', but only tcc, then you can't make it work 
except by changing sudo's build system or implementing the missing 
functionality in tcc -ar.

It's may for instance be possible to build binutils (at least parts of it) with 
tcc, then you would have a capable 'ar' program available.


Ciao,
Michael.

> 
> cheers
> James
> 
> James Mills / prologic
> 
> E: prolo...@shortcircuit.net.auw: prologic.shortcircuit.net.au
> Blog:  Read my Blog
> Twtxt: Follow me on twtxt.net
> 
> 
> On Thu, Nov 19, 2020 at 5:28 AM Michael Matz  wrote:
>   Hello,
>
>   On Tue, 17 Nov 2020, James Mills wrote:
>
>   > Hi guys,
>   > Tried to build sudo with tcc and it fails with:
>   >
>   > libtool: link: (cd .libs/sudoers.lax/libparsesudoers.a && 
> arx"/usr/ports/sudo/build/src/sudo-1.9.3p1/plugins/sudoers/./.libs/libparsesu
>   d
>   > oers.a")
>   > usage: tcc -ar [rcsv] lib file...
>   > create library ([abdioptxN] not supported).
>  

Re: [Tinycc-devel] Building sudo?

2020-11-29 Thread James Mills
But just to be sure, I did it again by hand just like what you described

=> https://gist.github.com/prologic/8b3b6bff539a1f070e145200c33c971a

Perhaps as you suggested we make tcc ignore some flags?

James Mills / prologic

E: prolo...@shortcircuit.net.au
W: prologic.shortcircuit.net.au
Blog:  Read my Blog <https://prologic.blog/>
Twtxt: Follow me on twtxt.net <https://twtxt.net/user/prologic>


On Sun, Nov 29, 2020 at 9:41 PM James Mills 
wrote:

> That doesn't work :/
>
> ./configure  is expecting to find an `ar` utility
>
> => https://gist.github.com/prologic/91c8be731d45446bc40987958ee75403
>
> cheers
> James
>
> James Mills / prologic
>
> E: prolo...@shortcircuit.net.au
> W: prologic.shortcircuit.net.au
> Blog:  Read my Blog <https://prologic.blog/>
> Twtxt: Follow me on twtxt.net <https://twtxt.net/user/prologic>
>
>
> On Sun, Nov 29, 2020 at 12:06 AM Christian Jullien 
> wrote:
>
>> Can you try:
>>
>>
>>
>> $ (unalias ar; CC=tcc ./configure --enable-shared=no)
>>
>>
>>
>> *From:* Tinycc-devel [mailto:tinycc-devel-bounces+eligis=
>> orange...@nongnu.org] *On Behalf Of *James Mills
>> *Sent:* Saturday, November 28, 2020 12:44
>> *To:* jull...@eligis.com; tinycc-devel@nongnu.org
>> *Subject:* Re: [Tinycc-devel] Building sudo?
>>
>>
>>
>> I did and it fails the same way.
>>
>>
>>
>> cheers
>>
>>
>>
>> James
>>
>>
>> James Mills / prologic
>>
>> E: prolo...@shortcircuit.net.au
>>
>> W: prologic.shortcircuit.net.au
>>
>> Blog:  Read my Blog <https://prologic.blog/>
>>
>> Twtxt: Follow me on twtxt.net <https://twtxt.net/user/prologic>
>>
>>
>>
>>
>>
>> On Sun, Nov 22, 2020 at 3:43 AM Christian Jullien 
>> wrote:
>>
>> James,
>>
>> Have you tried "CC=tcc ./configure --enable-shared=no" as I said.
>> It works ROOTB with sudo-1.9.3p1.tar.gz on both arm (RPi) and x64
>>
>> w.o. --enable-shared=no it fails because tcc does not support or
>> recognize -Wl,--version-script, maybe tcc should simply ignore this option.
>>
>> -Original Message-
>> From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=
>> orange...@nongnu.org] On Behalf Of Michael Matz
>> Sent: Friday, November 20, 2020 20:37
>> To: tinycc-devel@nongnu.org
>> Subject: Re: [Tinycc-devel] Building sudo?
>>
>> Hello,
>>
>> On Fri, 20 Nov 2020, James Mills wrote:
>>
>> > Are you saying if I don't alias ar to tcc -ar it will build?
>>
>> If you have another POSIX compatible ar, I suspect so, yes.
>>
>> > What am I missing? I need to alias ar to tcc -ar for other builds to
>> > work :)
>>
>> Well, it seems that sudo, as part of its default build process, wants to
>> extract archives it built itself.  tcc -ar simply is incapable of that
>> (right now), it only supports creating archives.  So, if you don't want to
>> hack sudo's build system then you need an 'ar' that can extract archives.
>> If you then do have such 'ar' (in $PATH), then not aliasing 'ar' to 'tcc
>> -ar' will do the right thing.
>>
>> If you don't have any such 'ar', but only tcc, then you can't make it
>> work except by changing sudo's build system or implementing the missing
>> functionality in tcc -ar.
>>
>> It's may for instance be possible to build binutils (at least parts of
>> it) with tcc, then you would have a capable 'ar' program available.
>>
>>
>> Ciao,
>> Michael.
>>
>> >
>> > cheers
>> > James
>> >
>> > James Mills / prologic
>> >
>> > E: prolo...@shortcircuit.net.auw: prologic.shortcircuit.net.au
>> > Blog:  Read my Blog
>> > Twtxt: Follow me on twtxt.net
>> >
>> >
>> > On Thu, Nov 19, 2020 at 5:28 AM Michael Matz 
>> wrote:
>> >   Hello,
>> >
>> >   On Tue, 17 Nov 2020, James Mills wrote:
>> >
>> >   > Hi guys,
>> >   > Tried to build sudo with tcc and it fails with:
>> >   >
>> >   > libtool: link: (cd .libs/sudoers.lax/libparsesudoers.a &&
>> arx"/usr/ports/sudo/build/src/sudo-1.9.3p1/plugins/sudoers/./.libs/libparsesu
>> >   d
>> >   > oers.a")
>> >   > usage: tcc -ar [rcsv] lib file...
>> >   > create library ([abdioptxN] not supported).
>> >   > make[1]: *** [Makefile:277: sudoers.la] Error 1
>>

Re: [Tinycc-devel] Building sudo?

2020-11-29 Thread James Mills
That doesn't work :/

./configure  is expecting to find an `ar` utility

=> https://gist.github.com/prologic/91c8be731d45446bc40987958ee75403

cheers
James

James Mills / prologic

E: prolo...@shortcircuit.net.au
W: prologic.shortcircuit.net.au
Blog:  Read my Blog <https://prologic.blog/>
Twtxt: Follow me on twtxt.net <https://twtxt.net/user/prologic>


On Sun, Nov 29, 2020 at 12:06 AM Christian Jullien  wrote:

> Can you try:
>
>
>
> $ (unalias ar; CC=tcc ./configure --enable-shared=no)
>
>
>
> *From:* Tinycc-devel [mailto:tinycc-devel-bounces+eligis=
> orange...@nongnu.org] *On Behalf Of *James Mills
> *Sent:* Saturday, November 28, 2020 12:44
> *To:* jull...@eligis.com; tinycc-devel@nongnu.org
> *Subject:* Re: [Tinycc-devel] Building sudo?
>
>
>
> I did and it fails the same way.
>
>
>
> cheers
>
>
>
> James
>
>
> James Mills / prologic
>
> E: prolo...@shortcircuit.net.au
>
> W: prologic.shortcircuit.net.au
>
> Blog:  Read my Blog <https://prologic.blog/>
>
> Twtxt: Follow me on twtxt.net <https://twtxt.net/user/prologic>
>
>
>
>
>
> On Sun, Nov 22, 2020 at 3:43 AM Christian Jullien 
> wrote:
>
> James,
>
> Have you tried "CC=tcc ./configure --enable-shared=no" as I said.
> It works ROOTB with sudo-1.9.3p1.tar.gz on both arm (RPi) and x64
>
> w.o. --enable-shared=no it fails because tcc does not support or recognize
> -Wl,--version-script, maybe tcc should simply ignore this option.
>
> -Original Message-
> From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=
> orange...@nongnu.org] On Behalf Of Michael Matz
> Sent: Friday, November 20, 2020 20:37
> To: tinycc-devel@nongnu.org
> Subject: Re: [Tinycc-devel] Building sudo?
>
> Hello,
>
> On Fri, 20 Nov 2020, James Mills wrote:
>
> > Are you saying if I don't alias ar to tcc -ar it will build?
>
> If you have another POSIX compatible ar, I suspect so, yes.
>
> > What am I missing? I need to alias ar to tcc -ar for other builds to
> > work :)
>
> Well, it seems that sudo, as part of its default build process, wants to
> extract archives it built itself.  tcc -ar simply is incapable of that
> (right now), it only supports creating archives.  So, if you don't want to
> hack sudo's build system then you need an 'ar' that can extract archives.
> If you then do have such 'ar' (in $PATH), then not aliasing 'ar' to 'tcc
> -ar' will do the right thing.
>
> If you don't have any such 'ar', but only tcc, then you can't make it work
> except by changing sudo's build system or implementing the missing
> functionality in tcc -ar.
>
> It's may for instance be possible to build binutils (at least parts of it)
> with tcc, then you would have a capable 'ar' program available.
>
>
> Ciao,
> Michael.
>
> >
> > cheers
> > James
> >
> > James Mills / prologic
> >
> > E: prolo...@shortcircuit.net.auw: prologic.shortcircuit.net.au
> > Blog:  Read my Blog
> > Twtxt: Follow me on twtxt.net
> >
> >
> > On Thu, Nov 19, 2020 at 5:28 AM Michael Matz 
> wrote:
> >   Hello,
> >
> >   On Tue, 17 Nov 2020, James Mills wrote:
> >
> >   > Hi guys,
> >   > Tried to build sudo with tcc and it fails with:
> >   >
> >   > libtool: link: (cd .libs/sudoers.lax/libparsesudoers.a &&
> arx"/usr/ports/sudo/build/src/sudo-1.9.3p1/plugins/sudoers/./.libs/libparsesu
> >   d
> >   > oers.a")
> >   > usage: tcc -ar [rcsv] lib file...
> >   > create library ([abdioptxN] not supported).
> >   > make[1]: *** [Makefile:277: sudoers.la] Error 1
> >   > make[1]: Leaving directory
> >   > '/usr/ports/sudo/build/src/sudo-1.9.3p1/plugins/sudoers'
> >   > make: *** [Makefile:108: all] Error 2
> >   > #
> >
> >   TCCs own 'ar' functionality is very limited, it's not a full
> >   replacement.
> >
> >   > Is tcc missing a feature needed here? Is there a work-around?
> >
> >   Yes, don't alias 'ar' to 'tcc -ar'.
> >
> >
> >   Ciao,
> >   Michael.
> >
> >   ___
> >   Tinycc-devel mailing list
> >   Tinycc-devel@nongnu.org
> >   https://lists.nongnu.org/mailman/listinfo/tinycc-devel
> >
> >
> >
>
>
> ___
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>
> ___
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] Building sudo?

2020-11-28 Thread Christian Jullien
Can you try:

 

$ (unalias ar; CC=tcc ./configure --enable-shared=no)

 

From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] On 
Behalf Of James Mills
Sent: Saturday, November 28, 2020 12:44
To: jull...@eligis.com; tinycc-devel@nongnu.org
Subject: Re: [Tinycc-devel] Building sudo?

 

I did and it fails the same way.

 

cheers

 

James



James Mills / prologic

E:  <mailto:prolo...@shortcircuit.net.au> prolo...@shortcircuit.net.au

W:  <mailto:https://prologic.shortcircuit.net.au> prologic.shortcircuit.net.au

Blog:   <https://prologic.blog/> Read my Blog

Twtxt:  <https://twtxt.net/user/prologic> Follow me on twtxt.net

 

 

On Sun, Nov 22, 2020 at 3:43 AM Christian Jullien  wrote:

James,

Have you tried "CC=tcc ./configure --enable-shared=no" as I said.
It works ROOTB with sudo-1.9.3p1.tar.gz on both arm (RPi) and x64

w.o. --enable-shared=no it fails because tcc does not support or recognize 
-Wl,--version-script, maybe tcc should simply ignore this option.

-Original Message-
From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis 
<mailto:tinycc-devel-bounces%2Beligis> =orange...@nongnu.org] On Behalf Of 
Michael Matz
Sent: Friday, November 20, 2020 20:37
To: tinycc-devel@nongnu.org
Subject: Re: [Tinycc-devel] Building sudo?

Hello,

On Fri, 20 Nov 2020, James Mills wrote:

> Are you saying if I don't alias ar to tcc -ar it will build?

If you have another POSIX compatible ar, I suspect so, yes.

> What am I missing? I need to alias ar to tcc -ar for other builds to 
> work :)

Well, it seems that sudo, as part of its default build process, wants to 
extract archives it built itself.  tcc -ar simply is incapable of that (right 
now), it only supports creating archives.  So, if you don't want to hack sudo's 
build system then you need an 'ar' that can extract archives. 
If you then do have such 'ar' (in $PATH), then not aliasing 'ar' to 'tcc -ar' 
will do the right thing.

If you don't have any such 'ar', but only tcc, then you can't make it work 
except by changing sudo's build system or implementing the missing 
functionality in tcc -ar.

It's may for instance be possible to build binutils (at least parts of it) with 
tcc, then you would have a capable 'ar' program available.


Ciao,
Michael.

> 
> cheers
> James
> 
> James Mills / prologic
> 
> E: prolo...@shortcircuit.net.auw: prologic.shortcircuit.net.au
> Blog:  Read my Blog
> Twtxt: Follow me on twtxt.net
> 
> 
> On Thu, Nov 19, 2020 at 5:28 AM Michael Matz  wrote:
>   Hello,
>
>   On Tue, 17 Nov 2020, James Mills wrote:
>
>   > Hi guys,
>   > Tried to build sudo with tcc and it fails with:
>   >
>   > libtool: link: (cd .libs/sudoers.lax/libparsesudoers.a && 
> arx"/usr/ports/sudo/build/src/sudo-1.9.3p1/plugins/sudoers/./.libs/libparsesu
>   d
>   > oers.a")
>   > usage: tcc -ar [rcsv] lib file...
>   > create library ([abdioptxN] not supported).
>   > make[1]: *** [Makefile:277: sudoers.la] Error 1
>   > make[1]: Leaving directory
>   > '/usr/ports/sudo/build/src/sudo-1.9.3p1/plugins/sudoers'
>   > make: *** [Makefile:108: all] Error 2
>   > #
>
>   TCCs own 'ar' functionality is very limited, it's not a full
>   replacement.
>
>   > Is tcc missing a feature needed here? Is there a work-around?
>
>   Yes, don't alias 'ar' to 'tcc -ar'.
> 
>
>   Ciao,
>   Michael.
>
>   ___
>   Tinycc-devel mailing list
>   Tinycc-devel@nongnu.org
>   https://lists.nongnu.org/mailman/listinfo/tinycc-devel
> 
> 
>


___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] Building sudo?

2020-11-28 Thread James Mills
I did and it fails the same way.

cheers

James

James Mills / prologic

E: prolo...@shortcircuit.net.au
W: prologic.shortcircuit.net.au
Blog:  Read my Blog <https://prologic.blog/>
Twtxt: Follow me on twtxt.net <https://twtxt.net/user/prologic>


On Sun, Nov 22, 2020 at 3:43 AM Christian Jullien  wrote:

> James,
>
> Have you tried "CC=tcc ./configure --enable-shared=no" as I said.
> It works ROOTB with sudo-1.9.3p1.tar.gz on both arm (RPi) and x64
>
> w.o. --enable-shared=no it fails because tcc does not support or recognize
> -Wl,--version-script, maybe tcc should simply ignore this option.
>
> -Original Message-
> From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=
> orange...@nongnu.org] On Behalf Of Michael Matz
> Sent: Friday, November 20, 2020 20:37
> To: tinycc-devel@nongnu.org
> Subject: Re: [Tinycc-devel] Building sudo?
>
> Hello,
>
> On Fri, 20 Nov 2020, James Mills wrote:
>
> > Are you saying if I don't alias ar to tcc -ar it will build?
>
> If you have another POSIX compatible ar, I suspect so, yes.
>
> > What am I missing? I need to alias ar to tcc -ar for other builds to
> > work :)
>
> Well, it seems that sudo, as part of its default build process, wants to
> extract archives it built itself.  tcc -ar simply is incapable of that
> (right now), it only supports creating archives.  So, if you don't want to
> hack sudo's build system then you need an 'ar' that can extract archives.
> If you then do have such 'ar' (in $PATH), then not aliasing 'ar' to 'tcc
> -ar' will do the right thing.
>
> If you don't have any such 'ar', but only tcc, then you can't make it work
> except by changing sudo's build system or implementing the missing
> functionality in tcc -ar.
>
> It's may for instance be possible to build binutils (at least parts of it)
> with tcc, then you would have a capable 'ar' program available.
>
>
> Ciao,
> Michael.
>
> >
> > cheers
> > James
> >
> > James Mills / prologic
> >
> > E: prolo...@shortcircuit.net.auw: prologic.shortcircuit.net.au
> > Blog:  Read my Blog
> > Twtxt: Follow me on twtxt.net
> >
> >
> > On Thu, Nov 19, 2020 at 5:28 AM Michael Matz 
> wrote:
> >   Hello,
> >
> >   On Tue, 17 Nov 2020, James Mills wrote:
> >
> >   > Hi guys,
> >   > Tried to build sudo with tcc and it fails with:
> >   >
> >   > libtool: link: (cd .libs/sudoers.lax/libparsesudoers.a &&
> arx"/usr/ports/sudo/build/src/sudo-1.9.3p1/plugins/sudoers/./.libs/libparsesu
> >   d
> >   > oers.a")
> >   > usage: tcc -ar [rcsv] lib file...
> >   > create library ([abdioptxN] not supported).
> >   > make[1]: *** [Makefile:277: sudoers.la] Error 1
> >   > make[1]: Leaving directory
> >   > '/usr/ports/sudo/build/src/sudo-1.9.3p1/plugins/sudoers'
> >   > make: *** [Makefile:108: all] Error 2
> >   > #
> >
> >   TCCs own 'ar' functionality is very limited, it's not a full
> >   replacement.
> >
> >   > Is tcc missing a feature needed here? Is there a work-around?
> >
> >   Yes, don't alias 'ar' to 'tcc -ar'.
> >
> >
> >   Ciao,
> >   Michael.
> >
> >   ___
> >   Tinycc-devel mailing list
> >   Tinycc-devel@nongnu.org
> >   https://lists.nongnu.org/mailman/listinfo/tinycc-devel
> >
> >
> >
>
>
> ___
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] Building sudo?

2020-11-21 Thread Christian Jullien
James,

Have you tried "CC=tcc ./configure --enable-shared=no" as I said.
It works ROOTB with sudo-1.9.3p1.tar.gz on both arm (RPi) and x64

w.o. --enable-shared=no it fails because tcc does not support or recognize 
-Wl,--version-script, maybe tcc should simply ignore this option.

-Original Message-
From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] On 
Behalf Of Michael Matz
Sent: Friday, November 20, 2020 20:37
To: tinycc-devel@nongnu.org
Subject: Re: [Tinycc-devel] Building sudo?

Hello,

On Fri, 20 Nov 2020, James Mills wrote:

> Are you saying if I don't alias ar to tcc -ar it will build?

If you have another POSIX compatible ar, I suspect so, yes.

> What am I missing? I need to alias ar to tcc -ar for other builds to 
> work :)

Well, it seems that sudo, as part of its default build process, wants to 
extract archives it built itself.  tcc -ar simply is incapable of that (right 
now), it only supports creating archives.  So, if you don't want to hack sudo's 
build system then you need an 'ar' that can extract archives. 
If you then do have such 'ar' (in $PATH), then not aliasing 'ar' to 'tcc -ar' 
will do the right thing.

If you don't have any such 'ar', but only tcc, then you can't make it work 
except by changing sudo's build system or implementing the missing 
functionality in tcc -ar.

It's may for instance be possible to build binutils (at least parts of it) with 
tcc, then you would have a capable 'ar' program available.


Ciao,
Michael.

> 
> cheers
> James
> 
> James Mills / prologic
> 
> E: prolo...@shortcircuit.net.auw: prologic.shortcircuit.net.au
> Blog:  Read my Blog
> Twtxt: Follow me on twtxt.net
> 
> 
> On Thu, Nov 19, 2020 at 5:28 AM Michael Matz  wrote:
>   Hello,
>
>   On Tue, 17 Nov 2020, James Mills wrote:
>
>   > Hi guys,
>   > Tried to build sudo with tcc and it fails with:
>   >
>   > libtool: link: (cd .libs/sudoers.lax/libparsesudoers.a && 
> arx"/usr/ports/sudo/build/src/sudo-1.9.3p1/plugins/sudoers/./.libs/libparsesu
>   d
>   > oers.a")
>   > usage: tcc -ar [rcsv] lib file...
>   > create library ([abdioptxN] not supported).
>   > make[1]: *** [Makefile:277: sudoers.la] Error 1
>   > make[1]: Leaving directory
>   > '/usr/ports/sudo/build/src/sudo-1.9.3p1/plugins/sudoers'
>   > make: *** [Makefile:108: all] Error 2
>   > #
>
>   TCCs own 'ar' functionality is very limited, it's not a full
>   replacement.
>
>   > Is tcc missing a feature needed here? Is there a work-around?
>
>   Yes, don't alias 'ar' to 'tcc -ar'.
> 
>
>   Ciao,
>   Michael.
>
>   ___
>   Tinycc-devel mailing list
>   Tinycc-devel@nongnu.org
>   https://lists.nongnu.org/mailman/listinfo/tinycc-devel
> 
> 
>


___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] Building sudo?

2020-11-20 Thread Michael Matz

Hello,

On Fri, 20 Nov 2020, James Mills wrote:


Are you saying if I don't alias ar to tcc -ar it will build?


If you have another POSIX compatible ar, I suspect so, yes.

What am I missing? I need to alias ar to tcc -ar for other builds to 
work :)


Well, it seems that sudo, as part of its default build process, wants to 
extract archives it built itself.  tcc -ar simply is incapable of that 
(right now), it only supports creating archives.  So, if you don't want to 
hack sudo's build system then you need an 'ar' that can extract archives. 
If you then do have such 'ar' (in $PATH), then not aliasing 'ar' to 'tcc 
-ar' will do the right thing.


If you don't have any such 'ar', but only tcc, then you can't make it work 
except by changing sudo's build system or implementing the missing 
functionality in tcc -ar.


It's may for instance be possible to build binutils (at least parts of it) 
with tcc, then you would have a capable 'ar' program available.



Ciao,
Michael.



cheers
James

James Mills / prologic

E: prolo...@shortcircuit.net.auw: prologic.shortcircuit.net.au
Blog:  Read my Blog
Twtxt: Follow me on twtxt.net


On Thu, Nov 19, 2020 at 5:28 AM Michael Matz  wrote:
  Hello,

  On Tue, 17 Nov 2020, James Mills wrote:

  > Hi guys,
  > Tried to build sudo with tcc and it fails with:
  >
  > libtool: link: (cd .libs/sudoers.lax/libparsesudoers.a && 
arx"/usr/ports/sudo/build/src/sudo-1.9.3p1/plugins/sudoers/./.libs/libparsesu
  d
  > oers.a")
  > usage: tcc -ar [rcsv] lib file...
  > create library ([abdioptxN] not supported).
  > make[1]: *** [Makefile:277: sudoers.la] Error 1
  > make[1]: Leaving directory
  > '/usr/ports/sudo/build/src/sudo-1.9.3p1/plugins/sudoers'
  > make: *** [Makefile:108: all] Error 2
  > #

  TCCs own 'ar' functionality is very limited, it's not a full
  replacement.

  > Is tcc missing a feature needed here? Is there a work-around?

  Yes, don't alias 'ar' to 'tcc -ar'.


  Ciao,
  Michael.

  ___
  Tinycc-devel mailing list
  Tinycc-devel@nongnu.org
  https://lists.nongnu.org/mailman/listinfo/tinycc-devel


___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] Building sudo?

2020-11-19 Thread James Mills
Michael,

Are you saying if I don't alias ar to tcc -ar it will build?

What am I missing? I need to alias ar to tcc -ar for other builds to work :)

cheers
James

James Mills / prologic

E: prolo...@shortcircuit.net.au
W: prologic.shortcircuit.net.au
Blog:  Read my Blog 
Twtxt: Follow me on twtxt.net 


On Thu, Nov 19, 2020 at 5:28 AM Michael Matz  wrote:

> Hello,
>
> On Tue, 17 Nov 2020, James Mills wrote:
>
> > Hi guys,
> > Tried to build sudo with tcc and it fails with:
> >
> > libtool: link: (cd .libs/sudoers.lax/libparsesudoers.a && ar
> x"/usr/ports/sudo/build/src/sudo-1.9.3p1/plugins/sudoers/./.libs/libparsesud
> > oers.a")
> > usage: tcc -ar [rcsv] lib file...
> > create library ([abdioptxN] not supported).
> > make[1]: *** [Makefile:277: sudoers.la] Error 1
> > make[1]: Leaving directory
> > '/usr/ports/sudo/build/src/sudo-1.9.3p1/plugins/sudoers'
> > make: *** [Makefile:108: all] Error 2
> > #
>
> TCCs own 'ar' functionality is very limited, it's not a full replacement.
>
> > Is tcc missing a feature needed here? Is there a work-around?
>
> Yes, don't alias 'ar' to 'tcc -ar'.
>
>
> Ciao,
> Michael.
>
> ___
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] Building sudo?

2020-11-18 Thread Michael Matz

Hello,

On Tue, 17 Nov 2020, James Mills wrote:


Hi guys,
Tried to build sudo with tcc and it fails with:

libtool: link: (cd .libs/sudoers.lax/libparsesudoers.a && ar 
x"/usr/ports/sudo/build/src/sudo-1.9.3p1/plugins/sudoers/./.libs/libparsesud
oers.a")
usage: tcc -ar [rcsv] lib file...
create library ([abdioptxN] not supported).
make[1]: *** [Makefile:277: sudoers.la] Error 1
make[1]: Leaving directory
'/usr/ports/sudo/build/src/sudo-1.9.3p1/plugins/sudoers'
make: *** [Makefile:108: all] Error 2
#


TCCs own 'ar' functionality is very limited, it's not a full replacement.


Is tcc missing a feature needed here? Is there a work-around?


Yes, don't alias 'ar' to 'tcc -ar'.


Ciao,
Michael.

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] Building sudo?

2020-11-17 Thread Christian Jullien
Tcc does not support all the ld options used by gcc, especially when building 
.so.

.a are much better supported.

 

Even on RPi, I can compile the latest sudo version using only static libs:

 

tar xvzf sudo-1.9.3p1.tar.gz

cd sudo-1.9.3p1/

CC=tcc ./configure --enable-shared=no

make

# First sudo is because I don’t want to install fresh version

sudo ./src/sudo ls

 

From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] On 
Behalf Of James Mills
Sent: Tuesday, November 17, 2020 14:40
To: tinycc-devel@nongnu.org
Subject: [Tinycc-devel] Building sudo?

 

Hi guys,

 

Tried to build sudo with tcc and it fails with:

 

libtool: link: (cd .libs/sudoers.lax/libparsesudoers.a && ar x 
"/usr/ports/sudo/build/src/sudo-1.9.3p1/plugins/sudoers/./.libs/libparsesudoers.a")
usage: tcc -ar [rcsv] lib file...
create library ([abdioptxN] not supported).
make[1]: *** [Makefile:277: sudoers.la] Error 1
make[1]: Leaving directory 
'/usr/ports/sudo/build/src/sudo-1.9.3p1/plugins/sudoers'
make: *** [Makefile:108: all] Error 2
#

 

Is tcc missing a feature needed here? Is there a work-around?

 

The damn thing _almost_ built :D

 

cheers

Jmaes



James Mills / prologic

E:  <mailto:prolo...@shortcircuit.net.au> prolo...@shortcircuit.net.au

W:  <mailto:https://prologic.shortcircuit.net.au> prologic.shortcircuit.net.au

Blog:   <https://prologic.blog/> Read my Blog

Twtxt:  <https://twtxt.net/user/prologic> Follow me on twtxt.net

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


[Tinycc-devel] Building sudo?

2020-11-17 Thread James Mills
Hi guys,

Tried to build sudo with tcc and it fails with:

libtool: link: (cd .libs/sudoers.lax/libparsesudoers.a && ar x
"/usr/ports/sudo/build/src/sudo-1.9.3p1/plugins/sudoers/./.libs/libparsesudoers.a")
usage: tcc -ar [rcsv] lib file...
create library ([abdioptxN] not supported).
make[1]: *** [Makefile:277: sudoers.la] Error 1
make[1]: Leaving directory
'/usr/ports/sudo/build/src/sudo-1.9.3p1/plugins/sudoers'
make: *** [Makefile:108: all] Error 2
#

Is tcc missing a feature needed here? Is there a work-around?

The damn thing _almost_ built :D

cheers
Jmaes

James Mills / prologic

E: prolo...@shortcircuit.net.au
W: prologic.shortcircuit.net.au
Blog:  Read my Blog 
Twtxt: Follow me on twtxt.net 
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel