mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] (no subject)
@ 2021-01-24 10:36 flix.ptxdist
  0 siblings, 0 replies; 29+ messages in thread
From: flix.ptxdist @ 2021-01-24 10:36 UTC (permalink / raw)
  To: ptxdist


The patch adds an option the libxml2 rules which allows to install the xmllint
tool to the target. The tool can be used i.e. for validating or formatting XML files.


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [ptxdist] (no subject)
  2018-12-11  7:41 [ptxdist] [PATCH 1/2] rules: polkit: Fix incorrect installation path Michael Olbrich
@ 2018-12-17  8:26 ` Dold, Wolfram
  0 siblings, 0 replies; 29+ messages in thread
From: Dold, Wolfram @ 2018-12-17  8:26 UTC (permalink / raw)
  To: ptxdist

On Mon, Dec 10, 2018 at 02:18:07PM +0000, Dold, Wolfram wrote:
> > Installing 'org.freedesktop.PolicyKit1.conf' to directory
> > '/etc/dbus-1/system.d/' fails.
> > The correct installation directory is '/usr/share/dbus-1/system.d/'.
> > ---
> >  rules/polkit.make | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/rules/polkit.make b/rules/polkit.make
> > index 4505e0e78..6e7b3eb0a 100644
> > --- a/rules/polkit.make
> > +++ b/rules/polkit.make
> > @@ -60,7 +60,7 @@ $(STATEDIR)/polkit.targetinstall:
> >  
> >  # dbus
> >  	@$(call install_copy, polkit, 0, 0, 0644, -, \
> > -		/etc/dbus-1/system.d/org.freedesktop.PolicyKit1.conf)
> > +		/usr/share/dbus-1/system.d/org.freedesktop.PolicyKit1.conf)
> 
> This does not work. 'make install' needs to install the file to the correct
> location as well. I think debian has a patch for this.
> 
While searching for the patch I found out that ubuntu is still actively
 maintaining the version polkit 105. So I thought it was worth using 
all Ubuntu patches in ptxdist as well.

Wolfram


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [ptxdist] (no subject)
  2017-02-28  9:44 ` fredy zavis
@ 2017-02-28 10:23   ` Juergen Borleis
  0 siblings, 0 replies; 29+ messages in thread
From: Juergen Borleis @ 2017-02-28 10:23 UTC (permalink / raw)
  To: fredy zavis; +Cc: ptxdist

On Tuesday 28 February 2017 10:44:03 fredy zavis wrote:
> unsubscribe 

Done.

-- 
Pengutronix e.K.                              | Juergen Borleis             |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [ptxdist] (no subject)
       [not found] <829880836.3299556.1488275043753.ref@mail.yahoo.com>
@ 2017-02-28  9:44 ` fredy zavis
  2017-02-28 10:23   ` Juergen Borleis
  0 siblings, 1 reply; 29+ messages in thread
From: fredy zavis @ 2017-02-28  9:44 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 15 bytes --]

unsubscribe 

[-- Attachment #1.2: Type: text/html, Size: 462 bytes --]

[-- Attachment #2: Type: text/plain, Size: 91 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [ptxdist] (no subject)
  2015-03-26 13:11 carsten.schlote
@ 2015-04-02 16:22 ` Michael Olbrich
  0 siblings, 0 replies; 29+ messages in thread
From: Michael Olbrich @ 2015-04-02 16:22 UTC (permalink / raw)
  To: ptxdist

On Thu, Mar 26, 2015 at 02:11:43PM +0100, carsten.schlote@gmx.net wrote:
> I updated the proftpd and stunnel packages to newer version.        

Thanks, both applied.

Michael

> Carsten
> 
> [PATCH 1/2] proftpd: Bumped version to 1.3.5
> [PATCH 2/2] stunnel: Version bump to 5.02
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [ptxdist] (no subject)
@ 2015-03-26 13:11 carsten.schlote
  2015-04-02 16:22 ` Michael Olbrich
  0 siblings, 1 reply; 29+ messages in thread
From: carsten.schlote @ 2015-03-26 13:11 UTC (permalink / raw)
  To: ptxdist

I updated the proftpd and stunnel packages to newer version.        

Carsten

[PATCH 1/2] proftpd: Bumped version to 1.3.5
[PATCH 2/2] stunnel: Version bump to 5.02

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [ptxdist] (no subject)
  2015-02-27  9:24                     ` Rüdiger, Christoph
  2015-02-27 10:32                       ` Juergen Borleis
@ 2015-02-27 15:36                       ` Michael Olbrich
  1 sibling, 0 replies; 29+ messages in thread
From: Michael Olbrich @ 2015-02-27 15:36 UTC (permalink / raw)
  To: ptxdist

On Fri, Feb 27, 2015 at 09:24:20AM +0000, Rüdiger, Christoph wrote:
> > On Fri, Feb 27, 2015 at 08:48:42AM +0000, Rüdiger, Christoph wrote:
> > > Am 26.02.15 um 13:23 schrieb Michael Olbrich:> On Tue, Feb 24, 2015 at
> > 09:28:29PM +0000, Rüdiger, Christoph wrote:
> > > >> Am 23.02.15 um 12:24 schrieb Michael Olbrich:> On Mon, Feb 23, 2015 at
> > 09:13:56AM +0000, Rüdiger, Christoph wrote:
> > > >>>>> On Mon, Feb 23, 2015 at 01:38:40AM +0200, Anders Montonen
> > wrote:
> > > >>>> You need to install a lot of GNU tools from exteranl sources
> > > >>>> (homebrew, MacPorts, Fink), so I do not see any problem in
> > > >>>> including bash into this list. My bigger problem is now, that
> > > >>>> there is no GNU linker available on OS X, so you need to use the
> > > >>>> LLVM linker which does not understand the -Wl,--as-needed flag. I
> > > >>>> need to dig deeper to understand since when GNU gcc set this flag
> > > >>>> by default and what the drawback is, if we remove this flag from the
> > PTXDIST_HOST_LDFLAGS.
> > > >>>
> > > >>> Hmm, "-Wl,--as-needed" should not be added implicitly and ptxdist
> > > >>> should only add it for target packages if
> > PTXCONF_TARGET_LINKER_AS_NEEDED is set.
> > > >>
> > > >> You are right. I just cross-read an article and got the information wrong.
> > > >> According to the GNU ld man page [1], --as-needed affects the
> > > >> DT_NEEDED flag only of dynamic libraries given _after_ --as-needed.
> > > >> As ptxdist sets it as the very last flag (see below), it is a useless flag.
> > > >
> > > > Which ptxdist version are you using?
> > >
> > > For this project, I need to stick with ptxdist-2013.12.0 for building OSELAS
> > toolchain 2013.12.2.
> > >
> > > > At least for target packages we set it in the right place. For me it
> > > > looks like this:
> > > > [...]
> > > > wrapper: /usr/bin/icecc arm-v7a-linux-gnueabihf-gcc  -Wl,--as-needed
> > > > -isystem [...]/platform-arm-hf/sysroot-target/include -isystem
> > > > [...]/platform-arm-hf/sysroot-target/usr/include  -O3
> > > > -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzip minigzip.o -L.
> > > > libz.a -L[...]/platform-arm-hf/sysroot-target/lib
> > > > -L[...]/platform-arm-hf/sysroot-target/usr/lib -Wl,-rpath-link
> > > > -Wl,[...]/platform-arm-hf/sysroot-target/lib -Wl,-rpath-link
> > > > -Wl,[...]/platform-arm-hf/sysroot-target/usr/lib
> > > > [...]
> > > >
> > > > The wrapper script adds it before the other options.
> > > >
> > > >>> If you start ptxdist with '-v' then all calls to the compiler and
> > > >>> linker are logged. Look for lines starting with 'wrapper:' in the logfile.
> > > >>
> > > >>
> > > >> wrapper:  gcc  -isystem
> > > >> /Volumes/BlueBox/src/OSELAS.Toolchain-2013.12.2/platform-arm-
> > cortex
> > > >> a8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-s
> > > >> anitized/sysroot-host/include -O3 -DNO_FSEEKO -DNO_STRERROR
> > > >> -DNO_vsnprintf -o minigzip minigzip.o -L. libz.a
> > > >> -L/Volumes/BlueBox/src/OSELAS.Toolchain-2013.12.2/platform-arm-
> > cort
> > > >> exa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12
> > > >> -sanitized/sysroot-host/lib -Wl,-rpath
> > > >> -Wl,/Volumes/BlueBox/src/OSELAS.Toolchain-2013.12.2/platform-arm-
> > co
> > > >> rtexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.
> > > >> 12-sanitized/sysroot-host/lib -Wl,-rpath
> > > >> -Wl,/this/is/a/long/path/to/make/host/tools/relocateable/with/chrpa
> > > >> th/when/using/dev/packages -Wl,--as-needed
> > > >
> > > > I'm not sure where the "-Wl,--as-needed" is comming from. The only
> > > > thing that is added at the end of the command-line is
> > > > PTXDIST_HOST_LDFLAGS and that's just the -L / -Wl,-rpath stuff.
> > >
> > > I've performed a simple grep and stripped out the wrapper and exec
> > > lines from the logfiles. This grep searched in the installed ptxdist,
> > > the ptxdist sources and the OSELAS sources, as I'm not quite sure, if
> > > it is coming from ptxdist or OSELAS toolchain project. But I tend to
> > > blame ptxdist ;-)
> > >
> > > Remember: The compilation of host-zlib within the OSELAS toolchain
> > project fails.
> > >
> > > $ grep -r -- '-Wl,--as-needed' *
> > [...]
> > > src/OSELAS.Toolchain-
> > 2013.12.2/rules/pre/toolchain.make:PTXDIST_HOST_LDFLAGS
> > 		+= -Wl,--as-needed
> > [...]
> > 
> > Here is the source of your problem. I originally added this because it some
> > really unnecessary dependencies for something in the toolchain.
> > 
> > Maybe we can only add it for the GNU ld? I'm not quite sure how to test for
> > this, because we need to check the linker called by the host compiler which
> > may not be 'ld'.
> 
> The LLVM linker is also called 'ld'. We need to check for the version string,
> which contains either "LLVM" or "GNU". If somebody can point me to a few
> places where to add this check, I can write something in the beginning of
> next week.

But it might not be the 'ld' in $PATH. So probably something like this is
necessary:
`gcc -print-prog-name=ld` -v | grep -q GNU

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [ptxdist] (no subject)
  2015-02-27  9:24                     ` Rüdiger, Christoph
@ 2015-02-27 10:32                       ` Juergen Borleis
  2015-02-27 15:36                       ` Michael Olbrich
  1 sibling, 0 replies; 29+ messages in thread
From: Juergen Borleis @ 2015-02-27 10:32 UTC (permalink / raw)
  To: ptxdist; +Cc: Rüdiger, Christoph

Hi Christoph,

On Friday 27 February 2015 10:24:20 Rüdiger, Christoph wrote:
> [...]
> Btw.: Does somebody know a good autoconf howto? In the past years I've
> tried to avoid using it as best as I can, but this seems to require some
> autoconf knowledge ;-)

Perhaps this one can help you:

http://www.gentoo.org/doc/en/articles/autotools-practices.xml

This one is also nice:

https://autotools.io/libtool/index.html

Regards,
Juergen

-- 
Pengutronix e.K.                              | Juergen Borleis             |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [ptxdist] (no subject)
  2015-02-27  9:23                   ` Juergen Borleis
@ 2015-02-27  9:31                     ` Rüdiger, Christoph
  0 siblings, 0 replies; 29+ messages in thread
From: Rüdiger, Christoph @ 2015-02-27  9:31 UTC (permalink / raw)
  To: Juergen Borleis, ptxdist



> -----Original Message-----
> From: Juergen Borleis [mailto:jbe@pengutronix.de]
> Sent: Friday, February 27, 2015 10:24 AM
> To: ptxdist@pengutronix.de
> Cc: Rüdiger, Christoph
> Subject: Re: [ptxdist] (no subject)
> 
> Hi Christoph,
> 
> On Friday 27 February 2015 09:48:42 Rüdiger, Christoph wrote:
> > [...]
> > > Which ptxdist version are you using?
> >
> > For this project, I need to stick with ptxdist-2013.12.0 for building
> > OSELAS toolchain 2013.12.2.
> 
> The used PTXdist version to build the toolchain is *independent* from the
> PTXdist version you can use for your BSP project.
> And all PTXdist versions can co-exist on your host filesystem.

I know this fact. We are currently using different ptxdist versions up to ptxdist-2014.08.0 for the different BSP projects.

Best regards,
Christoph

-- 
ThyssenKrupp Elevator Innovation GmbH
PDC Neuhausen
TKEI Elevator Control
Bernhaeuser Straße 45
73765 Neuhausen, Germany

Phone +49 7158 12-2615
christoph.ruediger@thyssenkrupp.com

Company domicile: Essen      Commercial register: Essen HRB 20 839
Postal address: ThyssenKrupp Allee 1, 45143 Essen, Germany
Executive Board: Gerhard Thumm, Katrin Huenger, Philippe Choleau
-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [ptxdist] (no subject)
  2015-02-27  9:06                   ` Michael Olbrich
@ 2015-02-27  9:24                     ` Rüdiger, Christoph
  2015-02-27 10:32                       ` Juergen Borleis
  2015-02-27 15:36                       ` Michael Olbrich
  0 siblings, 2 replies; 29+ messages in thread
From: Rüdiger, Christoph @ 2015-02-27  9:24 UTC (permalink / raw)
  To: ptxdist



> -----Original Message-----
> From: ptxdist-bounces@pengutronix.de [mailto:ptxdist-
> bounces@pengutronix.de] On Behalf Of Michael Olbrich
> Sent: Friday, February 27, 2015 10:07 AM
> To: ptxdist@pengutronix.de
> Subject: Re: [ptxdist] (no subject)
> 
> On Fri, Feb 27, 2015 at 08:48:42AM +0000, Rüdiger, Christoph wrote:
> > Am 26.02.15 um 13:23 schrieb Michael Olbrich:> On Tue, Feb 24, 2015 at
> 09:28:29PM +0000, Rüdiger, Christoph wrote:
> > >> Am 23.02.15 um 12:24 schrieb Michael Olbrich:> On Mon, Feb 23, 2015 at
> 09:13:56AM +0000, Rüdiger, Christoph wrote:
> > >>>>> On Mon, Feb 23, 2015 at 01:38:40AM +0200, Anders Montonen
> wrote:
> > >>>> You need to install a lot of GNU tools from exteranl sources
> > >>>> (homebrew, MacPorts, Fink), so I do not see any problem in
> > >>>> including bash into this list. My bigger problem is now, that
> > >>>> there is no GNU linker available on OS X, so you need to use the
> > >>>> LLVM linker which does not understand the -Wl,--as-needed flag. I
> > >>>> need to dig deeper to understand since when GNU gcc set this flag
> > >>>> by default and what the drawback is, if we remove this flag from the
> PTXDIST_HOST_LDFLAGS.
> > >>>
> > >>> Hmm, "-Wl,--as-needed" should not be added implicitly and ptxdist
> > >>> should only add it for target packages if
> PTXCONF_TARGET_LINKER_AS_NEEDED is set.
> > >>
> > >> You are right. I just cross-read an article and got the information wrong.
> > >> According to the GNU ld man page [1], --as-needed affects the
> > >> DT_NEEDED flag only of dynamic libraries given _after_ --as-needed.
> > >> As ptxdist sets it as the very last flag (see below), it is a useless flag.
> > >
> > > Which ptxdist version are you using?
> >
> > For this project, I need to stick with ptxdist-2013.12.0 for building OSELAS
> toolchain 2013.12.2.
> >
> > > At least for target packages we set it in the right place. For me it
> > > looks like this:
> > > [...]
> > > wrapper: /usr/bin/icecc arm-v7a-linux-gnueabihf-gcc  -Wl,--as-needed
> > > -isystem [...]/platform-arm-hf/sysroot-target/include -isystem
> > > [...]/platform-arm-hf/sysroot-target/usr/include  -O3
> > > -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzip minigzip.o -L.
> > > libz.a -L[...]/platform-arm-hf/sysroot-target/lib
> > > -L[...]/platform-arm-hf/sysroot-target/usr/lib -Wl,-rpath-link
> > > -Wl,[...]/platform-arm-hf/sysroot-target/lib -Wl,-rpath-link
> > > -Wl,[...]/platform-arm-hf/sysroot-target/usr/lib
> > > [...]
> > >
> > > The wrapper script adds it before the other options.
> > >
> > >>> If you start ptxdist with '-v' then all calls to the compiler and
> > >>> linker are logged. Look for lines starting with 'wrapper:' in the logfile.
> > >>
> > >>
> > >> wrapper:  gcc  -isystem
> > >> /Volumes/BlueBox/src/OSELAS.Toolchain-2013.12.2/platform-arm-
> cortex
> > >> a8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-s
> > >> anitized/sysroot-host/include -O3 -DNO_FSEEKO -DNO_STRERROR
> > >> -DNO_vsnprintf -o minigzip minigzip.o -L. libz.a
> > >> -L/Volumes/BlueBox/src/OSELAS.Toolchain-2013.12.2/platform-arm-
> cort
> > >> exa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12
> > >> -sanitized/sysroot-host/lib -Wl,-rpath
> > >> -Wl,/Volumes/BlueBox/src/OSELAS.Toolchain-2013.12.2/platform-arm-
> co
> > >> rtexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.
> > >> 12-sanitized/sysroot-host/lib -Wl,-rpath
> > >> -Wl,/this/is/a/long/path/to/make/host/tools/relocateable/with/chrpa
> > >> th/when/using/dev/packages -Wl,--as-needed
> > >
> > > I'm not sure where the "-Wl,--as-needed" is comming from. The only
> > > thing that is added at the end of the command-line is
> > > PTXDIST_HOST_LDFLAGS and that's just the -L / -Wl,-rpath stuff.
> >
> > I've performed a simple grep and stripped out the wrapper and exec
> > lines from the logfiles. This grep searched in the installed ptxdist,
> > the ptxdist sources and the OSELAS sources, as I'm not quite sure, if
> > it is coming from ptxdist or OSELAS toolchain project. But I tend to
> > blame ptxdist ;-)
> >
> > Remember: The compilation of host-zlib within the OSELAS toolchain
> project fails.
> >
> > $ grep -r -- '-Wl,--as-needed' *
> [...]
> > src/OSELAS.Toolchain-
> 2013.12.2/rules/pre/toolchain.make:PTXDIST_HOST_LDFLAGS
> 		+= -Wl,--as-needed
> [...]
> 
> Here is the source of your problem. I originally added this because it some
> really unnecessary dependencies for something in the toolchain.
> 
> Maybe we can only add it for the GNU ld? I'm not quite sure how to test for
> this, because we need to check the linker called by the host compiler which
> may not be 'ld'.

The LLVM linker is also called 'ld'. We need to check for the version string, which contains either "LLVM" or "GNU". If somebody can point me to a few places where to add this check, I can write something in the beginning of next week.

Btw.: Does somebody know a good autoconf howto? In the past years I've tried to avoid using it as best as I can, but this seems to require some autoconf knowledge ;-)

Best regards,
Christoph

--
ThyssenKrupp Elevator Innovation GmbH
PDC Neuhausen
TKEI Elevator Control
Bernhaeuser Straße 45
73765 Neuhausen, Germany

Phone +49 7158 12-2615
christoph.ruediger@thyssenkrupp.com

Company domicile: Essen      Commercial register: Essen HRB 20 839
Postal address: ThyssenKrupp Allee 1, 45143 Essen, Germany
Executive Board: Gerhard Thumm, Katrin Huenger, Philippe Choleau
-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [ptxdist] (no subject)
  2015-02-27  8:48                 ` Rüdiger, Christoph
  2015-02-27  9:06                   ` Michael Olbrich
@ 2015-02-27  9:23                   ` Juergen Borleis
  2015-02-27  9:31                     ` Rüdiger, Christoph
  1 sibling, 1 reply; 29+ messages in thread
From: Juergen Borleis @ 2015-02-27  9:23 UTC (permalink / raw)
  To: ptxdist; +Cc: Rüdiger, Christoph

Hi Christoph,

On Friday 27 February 2015 09:48:42 Rüdiger, Christoph wrote:
> [...]
> > Which ptxdist version are you using?
>
> For this project, I need to stick with ptxdist-2013.12.0 for building
> OSELAS toolchain 2013.12.2.

The used PTXdist version to build the toolchain is *independent* from the 
PTXdist version you can use for your BSP project.
And all PTXdist versions can co-exist on your host filesystem.

Regards,
Juergen

-- 
Pengutronix e.K.                              | Juergen Borleis             |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [ptxdist] (no subject)
  2015-02-27  8:48                 ` Rüdiger, Christoph
@ 2015-02-27  9:06                   ` Michael Olbrich
  2015-02-27  9:24                     ` Rüdiger, Christoph
  2015-02-27  9:23                   ` Juergen Borleis
  1 sibling, 1 reply; 29+ messages in thread
From: Michael Olbrich @ 2015-02-27  9:06 UTC (permalink / raw)
  To: ptxdist

On Fri, Feb 27, 2015 at 08:48:42AM +0000, Rüdiger, Christoph wrote:
> Am 26.02.15 um 13:23 schrieb Michael Olbrich:> On Tue, Feb 24, 2015 at 09:28:29PM +0000, Rüdiger, Christoph wrote:
> >> Am 23.02.15 um 12:24 schrieb Michael Olbrich:> On Mon, Feb 23, 2015 at 09:13:56AM +0000, Rüdiger, Christoph wrote:
> >>>>> On Mon, Feb 23, 2015 at 01:38:40AM +0200, Anders Montonen wrote:
> >>>> You need to install a lot of GNU tools from exteranl sources (homebrew,
> >>>> MacPorts, Fink), so I do not see any problem in including bash into this
> >>>> list. My bigger problem is now, that there is no GNU linker available on OS
> >>>> X, so you need to use the LLVM linker which does not understand the
> >>>> -Wl,--as-needed flag. I need to dig deeper to understand since when GNU gcc
> >>>> set this flag by default and what the drawback is, if we remove this flag
> >>>> from the PTXDIST_HOST_LDFLAGS.
> >>>
> >>> Hmm, "-Wl,--as-needed" should not be added implicitly and ptxdist should
> >>> only add it for target packages if PTXCONF_TARGET_LINKER_AS_NEEDED is set.
> >>
> >> You are right. I just cross-read an article and got the information wrong.
> >> According to the GNU ld man page [1], --as-needed affects the DT_NEEDED flag
> >> only of dynamic libraries given _after_ --as-needed. As ptxdist sets it as
> >> the very last flag (see below), it is a useless flag.
> > 
> > Which ptxdist version are you using?
> 
> For this project, I need to stick with ptxdist-2013.12.0 for building OSELAS toolchain 2013.12.2.
> 
> > At least for target packages we set it
> > in the right place. For me it looks like this:
> > [...]
> > wrapper: /usr/bin/icecc arm-v7a-linux-gnueabihf-gcc  -Wl,--as-needed -isystem [...]/platform-arm-hf/sysroot-target/include -isystem [...]/platform-arm-hf/sysroot-target/usr/include  -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzip minigzip.o -L. libz.a -L[...]/platform-arm-hf/sysroot-target/lib -L[...]/platform-arm-hf/sysroot-target/usr/lib -Wl,-rpath-link -Wl,[...]/platform-arm-hf/sysroot-target/lib -Wl,-rpath-link -Wl,[...]/platform-arm-hf/sysroot-target/usr/lib
> > [...]
> > 
> > The wrapper script adds it before the other options.
> > 
> >>> If you start ptxdist with '-v' then all calls to the compiler and linker
> >>> are logged. Look for lines starting with 'wrapper:' in the logfile.
> >>
> >>
> >> wrapper:  gcc  -isystem /Volumes/BlueBox/src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/sysroot-host/include -O3 -DNO_FSEEKO -DNO_STRERROR -DNO_vsnprintf -o minigzip minigzip.o -L. libz.a -L/Volumes/BlueBox/src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/sysroot-host/lib -Wl,-rpath -Wl,/Volumes/BlueBox/src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/sysroot-host/lib -Wl,-rpath -Wl,/this/is/a/long/path/to/make/host/tools/relocateable/with/chrpath/when/using/dev/packages -Wl,--as-needed
> > 
> > I'm not sure where the "-Wl,--as-needed" is comming from. The only thing
> > that is added at the end of the command-line is PTXDIST_HOST_LDFLAGS and
> > that's just the -L / -Wl,-rpath stuff.
> 
> I've performed a simple grep and stripped out the wrapper and exec lines from the logfiles. This grep searched in the installed ptxdist, the ptxdist sources and the OSELAS sources, as I'm not quite sure, if it is coming from ptxdist or OSELAS toolchain project. But I tend to blame ptxdist ;-)
> 
> Remember: The compilation of host-zlib within the OSELAS toolchain project fails.
> 
> $ grep -r -- '-Wl,--as-needed' *
[...]
> src/OSELAS.Toolchain-2013.12.2/rules/pre/toolchain.make:PTXDIST_HOST_LDFLAGS				+= -Wl,--as-needed
[...]

Here is the source of your problem. I originally added this because it some
really unnecessary dependencies for something in the toolchain.

Maybe we can only add it for the GNU ld? I'm not quite sure how to test for
this, because we need to check the linker called by the host compiler which
may not be 'ld'.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [ptxdist] (no subject)
  2015-02-26 12:23               ` Michael Olbrich
@ 2015-02-27  8:48                 ` Rüdiger, Christoph
  2015-02-27  9:06                   ` Michael Olbrich
  2015-02-27  9:23                   ` Juergen Borleis
  0 siblings, 2 replies; 29+ messages in thread
From: Rüdiger, Christoph @ 2015-02-27  8:48 UTC (permalink / raw)
  To: ptxdist



Am 26.02.15 um 13:23 schrieb Michael Olbrich:> On Tue, Feb 24, 2015 at 09:28:29PM +0000, Rüdiger, Christoph wrote:
>> Am 23.02.15 um 12:24 schrieb Michael Olbrich:> On Mon, Feb 23, 2015 at 09:13:56AM +0000, Rüdiger, Christoph wrote:
>>>>> On Mon, Feb 23, 2015 at 01:38:40AM +0200, Anders Montonen wrote:
>>>>>>
>>>>>>> On 22 Feb 2015, at 21:17, Christoph Rüdiger <christoph.ruediger@rwth-
>>>>> aachen.de> wrote:
>>>>>>> Am 22.02.15 um 10:38 schrieb Michael Olbrich:
>>>>>>>
>>>>>>>> I don't know why the bash in Max OS X cannot handle this. Maybe it's
>>>>> too
>>>>>>>> old? What version are you using?
>>>>>>> Your assumption is right. My OS X is 10.9.5 (Mavericks) and way newer
>>>>>>> than the Ubuntu 10.04.4 which is the oldest system where I use ptxdist
>>>>>>> for my day-to-day work. That's why I didn't took the version numbers
>>>>>>> into account. But I was wrong:
>>>>>>>
>>>>>>> Ubuntu 10.04.4: bash 4.1.5(1)-release
>>>>>>> OS X 10.9.5: bash 3.2.53(1)-release
>>>>>>
>>>>>> As you might have guessed, Bash 3.2 was the last version to be released
>>>>> under
>>>>>> the GPLv2 license, and Apple will not distribute any software covered by
>>>>>> GPLv3.
>>>>>
>>>>> So you'll be stuck with the old version. Let's see if we can stay
>>>>> compatible.
>>>>
>>>> You need to install a lot of GNU tools from exteranl sources (homebrew,
>>>> MacPorts, Fink), so I do not see any problem in including bash into this
>>>> list. My bigger problem is now, that there is no GNU linker available on OS
>>>> X, so you need to use the LLVM linker which does not understand the
>>>> -Wl,--as-needed flag. I need to dig deeper to understand since when GNU gcc
>>>> set this flag by default and what the drawback is, if we remove this flag
>>>> from the PTXDIST_HOST_LDFLAGS.
>>>
>>> Hmm, "-Wl,--as-needed" should not be added implicitly and ptxdist should
>>> only add it for target packages if PTXCONF_TARGET_LINKER_AS_NEEDED is set.
>>
>> You are right. I just cross-read an article and got the information wrong.
>> According to the GNU ld man page [1], --as-needed affects the DT_NEEDED flag
>> only of dynamic libraries given _after_ --as-needed. As ptxdist sets it as
>> the very last flag (see below), it is a useless flag.
> 
> Which ptxdist version are you using?

For this project, I need to stick with ptxdist-2013.12.0 for building OSELAS toolchain 2013.12.2.

> At least for target packages we set it
> in the right place. For me it looks like this:
> [...]
> wrapper: /usr/bin/icecc arm-v7a-linux-gnueabihf-gcc  -Wl,--as-needed -isystem [...]/platform-arm-hf/sysroot-target/include -isystem [...]/platform-arm-hf/sysroot-target/usr/include  -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzip minigzip.o -L. libz.a -L[...]/platform-arm-hf/sysroot-target/lib -L[...]/platform-arm-hf/sysroot-target/usr/lib -Wl,-rpath-link -Wl,[...]/platform-arm-hf/sysroot-target/lib -Wl,-rpath-link -Wl,[...]/platform-arm-hf/sysroot-target/usr/lib
> [...]
> 
> The wrapper script adds it before the other options.
> 
>>> If you start ptxdist with '-v' then all calls to the compiler and linker
>>> are logged. Look for lines starting with 'wrapper:' in the logfile.
>>
>>
>> wrapper:  gcc  -isystem /Volumes/BlueBox/src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/sysroot-host/include -O3 -DNO_FSEEKO -DNO_STRERROR -DNO_vsnprintf -o minigzip minigzip.o -L. libz.a -L/Volumes/BlueBox/src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/sysroot-host/lib -Wl,-rpath -Wl,/Volumes/BlueBox/src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/sysroot-host/lib -Wl,-rpath -Wl,/this/is/a/long/path/to/make/host/tools/relocateable/with/chrpath/when/using/dev/packages -Wl,--as-needed
> 
> I'm not sure where the "-Wl,--as-needed" is comming from. The only thing
> that is added at the end of the command-line is PTXDIST_HOST_LDFLAGS and
> that's just the -L / -Wl,-rpath stuff.

I've performed a simple grep and stripped out the wrapper and exec lines from the logfiles. This grep searched in the installed ptxdist, the ptxdist sources and the OSELAS sources, as I'm not quite sure, if it is coming from ptxdist or OSELAS toolchain project. But I tend to blame ptxdist ;-)

Remember: The compilation of host-zlib within the OSELAS toolchain project fails.

$ grep -r -- '-Wl,--as-needed' *
lib/ptxdist-2013.12.0/patches/cppunit-1.12.1/0002-libcppunit-needs-ldl-dlopen-dlclose-etc.patch:Without this building with -Wl,--as-needed fails later with
lib/ptxdist-2013.12.0/patches/eggdbus-0.6/0003-update-autotoolization.patch:   LDFLAGS="-Wl,--as-needed $LDFLAGS"
lib/ptxdist-2013.12.0/patches/lshw-B.02.14/0001-fix-cross-compilation.patch: 	LDFLAGS+= -Wl,--as-needed
lib/ptxdist-2013.12.0/patches/lshw-B.02.14/0001-fix-cross-compilation.patch: 	LDFLAGS+= -Wl,--as-needed
src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/build-cross/binutils-2.24/ld/testsuite/ld-plugin/lto.exp:   "-flto -fuse-linker-plugin -Wl,--as-needed" "-flto"
src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/build-cross/binutils-2.24/ld/testsuite/ld-plugin/lto.exp:   "-O2 -flto -fuse-linker-plugin -Wl,--as-needed tmpdir/pr13201.o -lm" ""
src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/build-cross/gcc-linaro-4.8-2013.11/libgfortran/acinclude.m4:    dnl Check whether -Wl,--as-needed is supported
src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/build-cross/gcc-linaro-4.8-2013.11/libgfortran/acinclude.m4:      LDFLAGS="$LDFLAGS -Wl,--as-needed -lm -Wl,--no-as-needed"
src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/build-cross/gcc-linaro-4.8-2013.11/libgfortran/configure:      LDFLAGS="$LDFLAGS -Wl,--as-needed -lm -Wl,--no-as-needed"
src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/build-target/glibc-2.18/.pc/0100-add-install-lib-all-target.patch/Makerules:	  -Wl,--as-needed $(build-module-objlist) -Wl,--no-as-needed \
src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/build-target/glibc-2.18/Makeconfig:as-needed := -Wl,--as-needed
src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/build-target/glibc-2.18/Makeconfig:libgcc_eh := -Wl,--as-needed -lgcc_s $(libunwind) -Wl,--no-as-needed
src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/build-target/glibc-2.18/Makerules:	  -Wl,--as-needed $(build-module-objlist) -Wl,--no-as-needed \
src/OSELAS.Toolchain-2013.12.2/rules/pre/toolchain.make:PTXDIST_HOST_LDFLAGS				+= -Wl,--as-needed
src/a/patches/cppunit-1.12.1/0002-libcppunit-needs-ldl-dlopen-dlclose-etc.patch:Without this building with -Wl,--as-needed fails later with
src/a/patches/eggdbus-0.6/0003-update-autotoolization.patch:   LDFLAGS="-Wl,--as-needed $LDFLAGS"
src/a/patches/lshw-B.02.14/0001-fix-cross-compilation.patch: 	LDFLAGS+= -Wl,--as-needed
src/a/patches/lshw-B.02.14/0001-fix-cross-compilation.patch: 	LDFLAGS+= -Wl,--as-needed
src/b/patches/cppunit-1.12.1/0002-libcppunit-needs-ldl-dlopen-dlclose-etc.patch:Without this building with -Wl,--as-needed fails later with
src/b/patches/eggdbus-0.6/0003-update-autotoolization.patch:   LDFLAGS="-Wl,--as-needed $LDFLAGS"
src/b/patches/lshw-B.02.14/0001-fix-cross-compilation.patch: 	LDFLAGS+= -Wl,--as-needed
src/b/patches/lshw-B.02.14/0001-fix-cross-compilation.patch: 	LDFLAGS+= -Wl,--as-needed
src/ptxdist-2013.12.0/patches/cppunit-1.12.1/0002-libcppunit-needs-ldl-dlopen-dlclose-etc.patch:Without this building with -Wl,--as-needed fails later with
src/ptxdist-2013.12.0/patches/eggdbus-0.6/0003-update-autotoolization.patch:   LDFLAGS="-Wl,--as-needed $LDFLAGS"
src/ptxdist-2013.12.0/patches/lshw-B.02.14/0001-fix-cross-compilation.patch: 	LDFLAGS+= -Wl,--as-needed
src/ptxdist-2013.12.0/patches/lshw-B.02.14/0001-fix-cross-compilation.patch: 	LDFLAGS+= -Wl,--as-needed
src/ptxdist-2013.12.0.orig/patches/cppunit-1.12.1/0002-libcppunit-needs-ldl-dlopen-dlclose-etc.patch:Without this building with -Wl,--as-needed fails later with
src/ptxdist-2013.12.0.orig/patches/eggdbus-0.6/0003-update-autotoolization.patch:   LDFLAGS="-Wl,--as-needed $LDFLAGS"
src/ptxdist-2013.12.0.orig/patches/lshw-B.02.14/0001-fix-cross-compilation.patch: 	LDFLAGS+= -Wl,--as-needed
src/ptxdist-2013.12.0.orig/patches/lshw-B.02.14/0001-fix-cross-compilation.patch: 	LDFLAGS+= -Wl,--as-needed



>> And here is the missing BASH_VERSINFO of Apple's bash:
>> $ set | grep BASH_VERSINFO
>> BASH_VERSINFO=([0]="3" [1]="2" [2]="53" [3]="1" [4]="release" [5]="x86_64-apple-darwin13")
> 
> So we could check for the version.

Regards,
Christoph

-- 
ThyssenKrupp Elevator Innovation GmbH
PDC Neuhausen
TKEI Elevator Control
Bernhaeuser Straße 45
73765 Neuhausen, Germany

Phone +49 7158 12-2615
christoph.ruediger@thyssenkrupp.com

Company domicile: Essen      Commercial register: Essen HRB 20 839
Postal address: ThyssenKrupp Allee 1, 45143 Essen, Germany 
Executive Board: Gerhard Thumm, Katrin Huenger, Philippe Choleau

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [ptxdist] (no subject)
  2015-02-24 21:28             ` Rüdiger, Christoph
@ 2015-02-26 12:23               ` Michael Olbrich
  2015-02-27  8:48                 ` Rüdiger, Christoph
  0 siblings, 1 reply; 29+ messages in thread
From: Michael Olbrich @ 2015-02-26 12:23 UTC (permalink / raw)
  To: ptxdist

On Tue, Feb 24, 2015 at 09:28:29PM +0000, Rüdiger, Christoph wrote:
> Am 23.02.15 um 12:24 schrieb Michael Olbrich:> On Mon, Feb 23, 2015 at 09:13:56AM +0000, Rüdiger, Christoph wrote:
> >>> On Mon, Feb 23, 2015 at 01:38:40AM +0200, Anders Montonen wrote:
> >>>>
> >>>>> On 22 Feb 2015, at 21:17, Christoph Rüdiger <christoph.ruediger@rwth-
> >>> aachen.de> wrote:
> >>>>> Am 22.02.15 um 10:38 schrieb Michael Olbrich:
> >>>>>
> >>>>>> I don't know why the bash in Max OS X cannot handle this. Maybe it's
> >>> too
> >>>>>> old? What version are you using?
> >>>>> Your assumption is right. My OS X is 10.9.5 (Mavericks) and way newer
> >>>>> than the Ubuntu 10.04.4 which is the oldest system where I use ptxdist
> >>>>> for my day-to-day work. That's why I didn't took the version numbers
> >>>>> into account. But I was wrong:
> >>>>>
> >>>>> Ubuntu 10.04.4: bash 4.1.5(1)-release
> >>>>> OS X 10.9.5: bash 3.2.53(1)-release
> >>>>
> >>>> As you might have guessed, Bash 3.2 was the last version to be released
> >>> under
> >>>> the GPLv2 license, and Apple will not distribute any software covered by
> >>>> GPLv3.
> >>>
> >>> So you'll be stuck with the old version. Let's see if we can stay
> >>> compatible.
> >>
> >> You need to install a lot of GNU tools from exteranl sources (homebrew,
> >> MacPorts, Fink), so I do not see any problem in including bash into this
> >> list. My bigger problem is now, that there is no GNU linker available on OS
> >> X, so you need to use the LLVM linker which does not understand the
> >> -Wl,--as-needed flag. I need to dig deeper to understand since when GNU gcc
> >> set this flag by default and what the drawback is, if we remove this flag
> >> from the PTXDIST_HOST_LDFLAGS.
> > 
> > Hmm, "-Wl,--as-needed" should not be added implicitly and ptxdist should
> > only add it for target packages if PTXCONF_TARGET_LINKER_AS_NEEDED is set.
> 
> You are right. I just cross-read an article and got the information wrong.
> According to the GNU ld man page [1], --as-needed affects the DT_NEEDED flag
> only of dynamic libraries given _after_ --as-needed. As ptxdist sets it as
> the very last flag (see below), it is a useless flag.

Which ptxdist version are you using? At least for target packages we set it
in the right place. For me it looks like this:
[...]
wrapper: /usr/bin/icecc arm-v7a-linux-gnueabihf-gcc  -Wl,--as-needed -isystem [...]/platform-arm-hf/sysroot-target/include -isystem [...]/platform-arm-hf/sysroot-target/usr/include  -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzip minigzip.o -L. libz.a -L[...]/platform-arm-hf/sysroot-target/lib -L[...]/platform-arm-hf/sysroot-target/usr/lib -Wl,-rpath-link -Wl,[...]/platform-arm-hf/sysroot-target/lib -Wl,-rpath-link -Wl,[...]/platform-arm-hf/sysroot-target/usr/lib
[...]

The wrapper script adds it before the other options.

> > If you start ptxdist with '-v' then all calls to the compiler and linker
> > are logged. Look for lines starting with 'wrapper:' in the logfile.
> 
> 
> wrapper:  gcc  -isystem /Volumes/BlueBox/src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/sysroot-host/include -O3 -DNO_FSEEKO -DNO_STRERROR -DNO_vsnprintf -o minigzip minigzip.o -L. libz.a -L/Volumes/BlueBox/src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/sysroot-host/lib -Wl,-rpath -Wl,/Volumes/BlueBox/src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/sysroot-host/lib -Wl,-rpath -Wl,/this/is/a/long/path/to/make/host/tools/relocateable/with/chrpath/when/using/dev/packages -Wl,--as-needed

I'm not sure where the "-Wl,--as-needed" is comming from. The only thing
that is added at the end of the command-line is PTXDIST_HOST_LDFLAGS and
that's just the -L / -Wl,-rpath stuff.


> And here is the missing BASH_VERSINFO of Apple's bash:
> $ set | grep BASH_VERSINFO
> BASH_VERSINFO=([0]="3" [1]="2" [2]="53" [3]="1" [4]="release" [5]="x86_64-apple-darwin13")

So we could check for the version.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [ptxdist] (no subject)
  2015-02-23 11:24           ` Michael Olbrich
@ 2015-02-24 21:28             ` Rüdiger, Christoph
  2015-02-26 12:23               ` Michael Olbrich
  0 siblings, 1 reply; 29+ messages in thread
From: Rüdiger, Christoph @ 2015-02-24 21:28 UTC (permalink / raw)
  To: ptxdist



Am 23.02.15 um 12:24 schrieb Michael Olbrich:> On Mon, Feb 23, 2015 at 09:13:56AM +0000, Rüdiger, Christoph wrote:
>>> On Mon, Feb 23, 2015 at 01:38:40AM +0200, Anders Montonen wrote:
>>>>
>>>>> On 22 Feb 2015, at 21:17, Christoph Rüdiger <christoph.ruediger@rwth-
>>> aachen.de> wrote:
>>>>> Am 22.02.15 um 10:38 schrieb Michael Olbrich:
>>>>>
>>>>>> I don't know why the bash in Max OS X cannot handle this. Maybe it's
>>> too
>>>>>> old? What version are you using?
>>>>> Your assumption is right. My OS X is 10.9.5 (Mavericks) and way newer
>>>>> than the Ubuntu 10.04.4 which is the oldest system where I use ptxdist
>>>>> for my day-to-day work. That's why I didn't took the version numbers
>>>>> into account. But I was wrong:
>>>>>
>>>>> Ubuntu 10.04.4: bash 4.1.5(1)-release
>>>>> OS X 10.9.5: bash 3.2.53(1)-release
>>>>
>>>> As you might have guessed, Bash 3.2 was the last version to be released
>>> under
>>>> the GPLv2 license, and Apple will not distribute any software covered by
>>>> GPLv3.
>>>
>>> So you'll be stuck with the old version. Let's see if we can stay
>>> compatible.
>>
>> You need to install a lot of GNU tools from exteranl sources (homebrew,
>> MacPorts, Fink), so I do not see any problem in including bash into this
>> list. My bigger problem is now, that there is no GNU linker available on OS
>> X, so you need to use the LLVM linker which does not understand the
>> -Wl,--as-needed flag. I need to dig deeper to understand since when GNU gcc
>> set this flag by default and what the drawback is, if we remove this flag
>> from the PTXDIST_HOST_LDFLAGS.
> 
> Hmm, "-Wl,--as-needed" should not be added implicitly and ptxdist should
> only add it for target packages if PTXCONF_TARGET_LINKER_AS_NEEDED is set.

You are right. I just cross-read an article and got the information wrong. According to the GNU ld man page [1], --as-needed affects the DT_NEEDED flag only of dynamic libraries given _after_ --as-needed. As ptxdist sets it as the very last flag (see below), it is a useless flag.


> If you start ptxdist with '-v' then all calls to the compiler and linker
> are logged. Look for lines starting with 'wrapper:' in the logfile.


wrapper:  gcc  -isystem /Volumes/BlueBox/src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/sysroot-host/include -O3 -DNO_FSEEKO -DNO_STRERROR -DNO_vsnprintf -o minigzip minigzip.o -L. libz.a -L/Volumes/BlueBox/src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/sysroot-host/lib -Wl,-rpath -Wl,/Volumes/BlueBox/src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/sysroot-host/lib -Wl,-rpath -Wl,/this/is/a/long/path/to/make/host/tools/relocateable/with/chrpath/when/using/dev/packages -Wl,--as-needed
wrapper:  gcc  -isystem /Volumes/BlueBox/src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/sysroot-host/include -O3 -DNO_FSEEKO -DNO_STRERROR -DNO_vsnprintf -o example example.o -L. libz.a -L/Volumes/BlueBox/src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/sysroot-host/lib -Wl,-rpath -Wl,/Volumes/BlueBox/src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/sysroot-host/lib -Wl,-rpath -Wl,/this/is/a/long/path/to/make/host/tools/relocateable/with/chrpath/when/using/dev/packages -Wl,--as-needed



And here is the missing BASH_VERSINFO of Apple's bash:
$ set | grep BASH_VERSINFO
BASH_VERSINFO=([0]="3" [1]="2" [2]="53" [3]="1" [4]="release" [5]="x86_64-apple-darwin13")


Best regards,
Christoph


[1] http://linux.die.net/man/1/ld

-- 
ThyssenKrupp Elevator Innovation GmbH
PDC Neuhausen
TKEI Elevator Control
Bernhaeuser Straße 45
73765 Neuhausen, Germany

Phone +49 7158 12-2615
christoph.ruediger@thyssenkrupp.com

Company domicile: Essen      Commercial register: Essen HRB 20 839
Postal address: ThyssenKrupp Allee 1, 45143 Essen, Germany 
Executive Board: Gerhard Thumm, Katrin Huenger, Philippe Choleau
-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [ptxdist] (no subject)
  2015-02-23  9:13         ` Rüdiger, Christoph
@ 2015-02-23 11:24           ` Michael Olbrich
  2015-02-24 21:28             ` Rüdiger, Christoph
  0 siblings, 1 reply; 29+ messages in thread
From: Michael Olbrich @ 2015-02-23 11:24 UTC (permalink / raw)
  To: ptxdist

On Mon, Feb 23, 2015 at 09:13:56AM +0000, Rüdiger, Christoph wrote:
> > On Mon, Feb 23, 2015 at 01:38:40AM +0200, Anders Montonen wrote:
> > >
> > > > On 22 Feb 2015, at 21:17, Christoph Rüdiger <christoph.ruediger@rwth-
> > aachen.de> wrote:
> > > > Am 22.02.15 um 10:38 schrieb Michael Olbrich:
> > > >
> > > >> I don't know why the bash in Max OS X cannot handle this. Maybe it's
> > too
> > > >> old? What version are you using?
> > > > Your assumption is right. My OS X is 10.9.5 (Mavericks) and way newer
> > > > than the Ubuntu 10.04.4 which is the oldest system where I use ptxdist
> > > > for my day-to-day work. That's why I didn't took the version numbers
> > > > into account. But I was wrong:
> > > >
> > > > Ubuntu 10.04.4: bash 4.1.5(1)-release
> > > > OS X 10.9.5: bash 3.2.53(1)-release
> > >
> > > As you might have guessed, Bash 3.2 was the last version to be released
> > under
> > > the GPLv2 license, and Apple will not distribute any software covered by
> > > GPLv3.
> > 
> > So you'll be stuck with the old version. Let's see if we can stay
> > compatible.
> 
> You need to install a lot of GNU tools from exteranl sources (homebrew,
> MacPorts, Fink), so I do not see any problem in including bash into this
> list. My bigger problem is now, that there is no GNU linker available on OS
> X, so you need to use the LLVM linker which does not understand the
> -Wl,--as-needed flag. I need to dig deeper to understand since when GNU gcc
> set this flag by default and what the drawback is, if we remove this flag
> from the PTXDIST_HOST_LDFLAGS.

Hmm, "-Wl,--as-needed" should not be added implicitly and ptxdist should
only add it for target packages if PTXCONF_TARGET_LINKER_AS_NEEDED is set.

If you start ptxdist with '-v' then all calls to the compiler and linker
are logged. Look for lines starting with 'wrapper:' in the logfile.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [ptxdist] (no subject)
  2015-02-23  8:33       ` Michael Olbrich
@ 2015-02-23  9:13         ` Rüdiger, Christoph
  2015-02-23 11:24           ` Michael Olbrich
  0 siblings, 1 reply; 29+ messages in thread
From: Rüdiger, Christoph @ 2015-02-23  9:13 UTC (permalink / raw)
  To: ptxdist



> -----Ursprüngliche Nachricht-----
> Von: ptxdist-bounces@pengutronix.de [mailto:ptxdist-
> bounces@pengutronix.de] Im Auftrag von Michael Olbrich
> Gesendet: Montag, 23. Februar 2015 09:33
> An: ptxdist@pengutronix.de
> Betreff: Re: [ptxdist] (no subject)
> 
> On Mon, Feb 23, 2015 at 01:38:40AM +0200, Anders Montonen wrote:
> >
> > > On 22 Feb 2015, at 21:17, Christoph Rüdiger <christoph.ruediger@rwth-
> aachen.de> wrote:
> > > Am 22.02.15 um 10:38 schrieb Michael Olbrich:
> > >
> > >> I don't know why the bash in Max OS X cannot handle this. Maybe it's
> too
> > >> old? What version are you using?
> > > Your assumption is right. My OS X is 10.9.5 (Mavericks) and way newer
> > > than the Ubuntu 10.04.4 which is the oldest system where I use ptxdist
> > > for my day-to-day work. That's why I didn't took the version numbers
> > > into account. But I was wrong:
> > >
> > > Ubuntu 10.04.4: bash 4.1.5(1)-release
> > > OS X 10.9.5: bash 3.2.53(1)-release
> >
> > As you might have guessed, Bash 3.2 was the last version to be released
> under
> > the GPLv2 license, and Apple will not distribute any software covered by
> > GPLv3.
> 
> So you'll be stuck with the old version. Let's see if we can stay
> compatible.

You need to install a lot of GNU tools from exteranl sources (homebrew, MacPorts, Fink), so I do not see any problem in including bash into this list. My bigger problem is now, that there is no GNU linker available on OS X, so you need to use the LLVM linker which does not understand the -Wl,--as-needed flag. I need to dig deeper to understand since when GNU gcc set this flag by default and what the drawback is, if we remove this flag from the PTXDIST_HOST_LDFLAGS.


> Christoph: does the exec with explicit fd numbers work?

The exec with explicit fd numbers worked in a quick test on the command line.


> And what's the
> output of "set | grep BASH_VERSINFO" for the old bash?

I do not have access to the Mac right now. You will receive an answer later this day.


Best regards,
Christoph

-- 
ThyssenKrupp Elevator Innovation GmbH
PDC Neuhausen
TKEI Elevator Control
Bernhaeuser Straße 45
73765 Neuhausen, Germany

Phone +49 7158 12-2615
christoph.ruediger@thyssenkrupp.com

Company domicile: Essen      Commercial register: Essen HRB 20 839
Postal address: ThyssenKrupp Allee 1, 45143 Essen, Germany 
Executive Board: Gerhard Thumm, Katrin Huenger, Philippe Choleau

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [ptxdist] (no subject)
  2015-02-22 23:38     ` Anders Montonen
@ 2015-02-23  8:33       ` Michael Olbrich
  2015-02-23  9:13         ` Rüdiger, Christoph
  0 siblings, 1 reply; 29+ messages in thread
From: Michael Olbrich @ 2015-02-23  8:33 UTC (permalink / raw)
  To: ptxdist

On Mon, Feb 23, 2015 at 01:38:40AM +0200, Anders Montonen wrote:
> 
> > On 22 Feb 2015, at 21:17, Christoph Rüdiger <christoph.ruediger@rwth-aachen.de> wrote:
> > Am 22.02.15 um 10:38 schrieb Michael Olbrich:
> > 
> >> I don't know why the bash in Max OS X cannot handle this. Maybe it's too
> >> old? What version are you using?
> > Your assumption is right. My OS X is 10.9.5 (Mavericks) and way newer
> > than the Ubuntu 10.04.4 which is the oldest system where I use ptxdist
> > for my day-to-day work. That's why I didn't took the version numbers
> > into account. But I was wrong:
> > 
> > Ubuntu 10.04.4: bash 4.1.5(1)-release
> > OS X 10.9.5: bash 3.2.53(1)-release
> 
> As you might have guessed, Bash 3.2 was the last version to be released under
> the GPLv2 license, and Apple will not distribute any software covered by
> GPLv3.

So you'll be stuck with the old version. Let's see if we can stay
compatible.
Christoph: does the exec with explicit fd numbers work? And what's the
output of "set | grep BASH_VERSINFO" for the old bash?

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [ptxdist] (no subject)
  2015-02-22 19:17   ` Christoph Rüdiger
@ 2015-02-22 23:38     ` Anders Montonen
  2015-02-23  8:33       ` Michael Olbrich
  0 siblings, 1 reply; 29+ messages in thread
From: Anders Montonen @ 2015-02-22 23:38 UTC (permalink / raw)
  To: ptxdist


> On 22 Feb 2015, at 21:17, Christoph Rüdiger <christoph.ruediger@rwth-aachen.de> wrote:
> Am 22.02.15 um 10:38 schrieb Michael Olbrich:
> 
>> I don't know why the bash in Max OS X cannot handle this. Maybe it's too
>> old? What version are you using?
> Your assumption is right. My OS X is 10.9.5 (Mavericks) and way newer
> than the Ubuntu 10.04.4 which is the oldest system where I use ptxdist
> for my day-to-day work. That's why I didn't took the version numbers
> into account. But I was wrong:
> 
> Ubuntu 10.04.4: bash 4.1.5(1)-release
> OS X 10.9.5: bash 3.2.53(1)-release

As you might have guessed, Bash 3.2 was the last version to be released under the GPLv2 license, and Apple will not distribute any software covered by GPLv3.

-a
-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [ptxdist] (no subject)
  2015-02-22  9:38 ` Michael Olbrich
@ 2015-02-22 19:17   ` Christoph Rüdiger
  2015-02-22 23:38     ` Anders Montonen
  0 siblings, 1 reply; 29+ messages in thread
From: Christoph Rüdiger @ 2015-02-22 19:17 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 3318 bytes --]



Am 22.02.15 um 10:38 schrieb Michael Olbrich:
>> What is the intention of this brace usage here?
> 
> It's valid bash syntax. A bit of history here:
> The standard for sh shells says, that the file descriptors up to 9 can be
> used inside the shell scripts. So that's what we used originally: With
> "5>&1" we create a file descriptor that we can later use to write to stdout
> when the normal stdout is redirected to the log file.
> However this solution as a problem: oder scripts can use the same file
> descriptor numbers and the output is send to the wrong place. This happened
> e.g. with configure scripts. So we changed it to:
> "exec {PTXDIST_FD_STDOUT}>&1". This is valid in bash and means that a new
> file descriptor is opened (with a currently unused number >= 10) and
> anything written to it is send to stdout. The file descriptor number is
> stored in the specified variable (PTXDIST_FD_STDOUT).

Thank you very much for the explanation. I've never heard or read about
this feature before.


> I don't know why the bash in Max OS X cannot handle this. Maybe it's too
> old? What version are you using?

Your assumption is right. My OS X is 10.9.5 (Mavericks) and way newer
than the Ubuntu 10.04.4 which is the oldest system where I use ptxdist
for my day-to-day work. That's why I didn't took the version numbers
into account. But I was wrong:

Ubuntu 10.04.4: bash 4.1.5(1)-release
OS X 10.9.5: bash 3.2.53(1)-release

Just for completeness: The redirection feature with the optional left
hand {var} notation was introduced in bash 4.1-alpha (see
http://git.savannah.gnu.org/cgit/bash.git/tree/CHANGES#n1550).

bash 4.1 was released on 31 Dec. 2009. :-)

> Maybe something like this works:
> exec 7>&1
> exec 8>&1
> export PTXDIST_FD_STDOUT=7
> export PTXDIST_FD_STDERR=8

I've installed a recent bash 4.3.33 via homebrew instead. But this is
only part of the fix, because the ptxdist' scripts have a hardcoded
shebang to /bin/bash.

Additionally I needed to replace the Apple bash:
# mv /bin/bash /bin/bash.apple
# ln -s /usr/local/bin/bash /bin/bash


Here is also a potential fix for the configure script to check for a
proper bash version. I've never worked with autoconf, so please check
the patch carefully.

diff -urd a/configure.ac b/configure.ac
--- a/configure.ac	2013-12-18 10:48:42.000000000 +0100
+++ b/configure.ac	2015-02-22 19:16:21.000000000 +0100
@@ -101,9 +101,9 @@
 # though the result /could/ be available to us directly as $BASH_VERSION we
 # don't want to use, or trust it, incase the user is specifying a different
 # bash executable.
-if `$BASH -c '[[ "$BASH_VERSION" \< "2.04" ]]'` ; then
+if `$BASH -c '[[ "$BASH_VERSION" \< "4.1" ]]'` ; then
     AC_MSG_ERROR([
-$PACKAGE_NAME requires at least version 2.04 of bash, you can download
a current
+$PACKAGE_NAME requires at least version 4.1 of bash, you can download a
current
 version of bash from ftp.gnu.org
 ])
 fi

This problem seems to be solved now.

I'm now facing the problem, that host-zlib is not getting compiled with
the compiler setup in ptxdist setup. But this is part of another story
coming soon.

Best regards,
Christoph


-- 
Christoph Rüdiger
Am Horber Wald 19
73765 Neuhausen

phone: +49 - 7158 - 12 84 670


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 882 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [ptxdist] (no subject)
  2015-02-21 23:07 Rüdiger, Christoph
  2015-02-21 23:11 ` Jon Ringle
@ 2015-02-22  9:38 ` Michael Olbrich
  2015-02-22 19:17   ` Christoph Rüdiger
  1 sibling, 1 reply; 29+ messages in thread
From: Michael Olbrich @ 2015-02-22  9:38 UTC (permalink / raw)
  To: ptxdist

On Sat, Feb 21, 2015 at 11:07:55PM +0000, Rüdiger, Christoph wrote:
> I'm trying to use ptxdist on a Mac OS X system to get rid of the Linux VM
> just for compiling things. Here is the thing I stumbled upon because I
> don't get the intention and therefore struggle to find a patch.
> 
> The git commit 0dc57566bc5a25d2b086de333844a3c00addf0e4 from 2012-12-13
> changed the body of the ptxd_make_log() function in scripts/libptxdist.sh
> from this implementation
> 
> -ptxd_make_log() {
> -       #
> -       # fd3 == stdout to logfile
> -       # fd4 == stderr to logfile
> -       # fd5 == clean stdout
> -       # fd6 == clean stderr
> -       #
> -       {
> -               export PTXDIST_FD_STDOUT=5
> -               export PTXDIST_FD_STDERR=6
> -               export PTXDIST_FD_LOGFILE=7
> -               {
> -                       if [ -z "${PTXDIST_QUIET}" ]; then
> -                               ptxd_make "${@}" 4>&- |
> -                               # make's stdout on fd0
> -                               tee -a "${PTX_LOGFILE}" 2>&4 4>&- 5>&- 6>&-
> -                               check_pipe_status || return
> -                       else
> -                               exec 4>&-
> -                               ptxd_make "${@}" 1>> "${PTX_LOGFILE}"
> -                       fi
> -               } 2>&1 1>&3 3>&- 7>> "${PTX_LOGFILE}" |
> -               # make's stderr on fd0
> -               tee -a "${PTX_LOGFILE}" 1>&2 3>&- 4>&- 5>&- 6>&-
> -               check_pipe_status || return
> -       } 3>&1 4>&2 5>&1 6>&2
> -}
> 
> to this implementation
> 
> +ptxd_make_log() {(
> +       # stdout only
> +       exec {PTXDIST_FD_STDOUT}>&1
> +       # stderr only
> +       exec {PTXDIST_FD_STDERR}>&2
> +       # logfile only
> +       exec 9>> "${PTX_LOGFILE}"
> +       export PTXDIST_FD_STDOUT
> +       export PTXDIST_FD_STDERR
> +       export PTXDIST_FD_LOGFILE=9
> +
> +       if [ -z "${PTXDIST_QUIET}" ]; then
> +               # stdout and logfile
> +               exec {logout}> >(tee -a "${PTX_LOGFILE}")
> +       else
> +               # logfile only
> +               exec {logout}>> "${PTX_LOGFILE}"
> +       fi
> +       # stderr and logfile
> +       exec {logerr}> >(tee -a "${PTX_LOGFILE}" >&2)
> +
> +       ptxd_make "${@}" 1>&${logout} 2>&${logerr}
> +)}
> 
> 
> Now, my bash is complaining at the first exec command:
> 
> > exec: {PTXDIST_FD_STDOUT}: not found
> 
> 
> To me, it looks fully understandable, because {PTXDIST_FD_STDOUT} is an
> ill-formed brace expansion and is therefore ignored. But why is the Linux
> (Ubuntu 12.04) not complaining about?
> 
> What is the intention of this brace usage here?

It's valid bash syntax. A bit of history here:
The standard for sh shells says, that the file descriptors up to 9 can be
used inside the shell scripts. So that's what we used originally: With
"5>&1" we create a file descriptor that we can later use to write to stdout
when the normal stdout is redirected to the log file.
However this solution as a problem: oder scripts can use the same file
descriptor numbers and the output is send to the wrong place. This happened
e.g. with configure scripts. So we changed it to:
"exec {PTXDIST_FD_STDOUT}>&1". This is valid in bash and means that a new
file descriptor is opened (with a currently unused number >= 10) and
anything written to it is send to stdout. The file descriptor number is
stored in the specified variable (PTXDIST_FD_STDOUT).

I don't know why the bash in Max OS X cannot handle this. Maybe it's too
old? What version are you using?
Maybe something like this works:
exec 7>&1
exec 8>&1
export PTXDIST_FD_STDOUT=7
export PTXDIST_FD_STDERR=8

Regards,
Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [ptxdist] (no subject)
  2015-02-21 23:29   ` Rüdiger, Christoph
@ 2015-02-21 23:43     ` Rüdiger, Christoph
  0 siblings, 0 replies; 29+ messages in thread
From: Rüdiger, Christoph @ 2015-02-21 23:43 UTC (permalink / raw)
  To: ptxdist



Am 22.02.15 um 00:29 schrieb Rüdiger, Christoph:>>     +ptxd_make_log() {(
>>     +       # stdout only
>>     +       exec {PTXDIST_FD_STDOUT}>&1
>>     +       # stderr only
>>     +       exec {PTXDIST_FD_STDERR}>&2
>>
>>
>> missing $
>> try:
>> exec ${PTXDIST_FD_STDOUT}>&1
>> exec ${PTXDIST_FD_STDERR}>&2
> 
> 
> That was my first impression as well. A simple typing error. But why is it running in GNU bash but not in Apple's bash?

I'm not quite sure, if this is clear or not, but the simple dollar sign is not the fix. If adding the dollar sign to convert the brace expansions to parameter expansions, the next error is in the last line of the function:

> ${logout}: ambiguous redirect

So I'm still searching for explanations on why there are brace expansions and why the work in Ubuntu's bash, but not in Apple's bash.

Best regards,
Christoph

P.S.: Sorry for the double post. It's late. Maybe too late.

--
ThyssenKrupp Elevator Innovation GmbH
PDC Neuhausen
TKEI Elevator Control
Bernhaeuser Str. 45
73765 Neuhausen, Germany

Phone +49 7158 12-2615
christoph.ruediger@thyssenkrupp.com

Company domicile: Essen      Commercial register: Essen HRB 20 839
Postal address: ThyssenKrupp Allee 1, 45143 Essen, Germany
Executive Board: Gerhard Thumm, Katrin Huenger, Philippe Choleau
--
ptxdist mailing list
ptxdist@pengutronix.de
-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [ptxdist] (no subject)
  2015-02-21 23:11 ` Jon Ringle
@ 2015-02-21 23:29   ` Rüdiger, Christoph
  2015-02-21 23:43     ` Rüdiger, Christoph
  0 siblings, 1 reply; 29+ messages in thread
From: Rüdiger, Christoph @ 2015-02-21 23:29 UTC (permalink / raw)
  To: ptxdist

>     +ptxd_make_log() {(
>     +       # stdout only
>     +       exec {PTXDIST_FD_STDOUT}>&1
>     +       # stderr only
>     +       exec {PTXDIST_FD_STDERR}>&2
> 
> 
> missing $
> try:
> exec ${PTXDIST_FD_STDOUT}>&1
> exec ${PTXDIST_FD_STDERR}>&2


That was my first impression as well. A simple typing error. But why is it running in GNU bash but not in Apple's bash?


Best regards,
Christoph

-- 
ThyssenKrupp Elevator Innovation GmbH
PDC Neuhausen
TKEI Elevator Control
Bernhaeuser Str. 45
73765 Neuhausen, Germany
 
Phone +49 7158 12-2615
christoph.ruediger@thyssenkrupp.com
 
Company domicile: Essen      Commercial register: Essen HRB 20 839
Postal address: ThyssenKrupp Allee 1, 45143 Essen, Germany
Executive Board: Gerhard Thumm, Katrin Huenger, Philippe Choleau
-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [ptxdist] (no subject)
  2015-02-21 23:07 Rüdiger, Christoph
@ 2015-02-21 23:11 ` Jon Ringle
  2015-02-21 23:29   ` Rüdiger, Christoph
  2015-02-22  9:38 ` Michael Olbrich
  1 sibling, 1 reply; 29+ messages in thread
From: Jon Ringle @ 2015-02-21 23:11 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 1904 bytes --]

On Sat, Feb 21, 2015 at 6:07 PM, Rüdiger, Christoph <
Christoph.Ruediger@thyssenkrupp.com> wrote:

> Hello,
>
> I'm trying to use ptxdist on a Mac OS X system to get rid of the Linux VM
> just for compiling things. Here is the thing I stumbled upon because I
> don't get the intention and therefore struggle to find a patch.
>
> The git commit 0dc57566bc5a25d2b086de333844a3c00addf0e4 from 2012-12-13
> changed the body of the ptxd_make_log() function in scripts/libptxdist.sh
> from this implementation
>
> -ptxd_make_log() {
> -       #
> -       # fd3 == stdout to logfile
> -       # fd4 == stderr to logfile
> -       # fd5 == clean stdout
> -       # fd6 == clean stderr
> -       #
> -       {
> -               export PTXDIST_FD_STDOUT=5
> -               export PTXDIST_FD_STDERR=6
> -               export PTXDIST_FD_LOGFILE=7
> -               {
> -                       if [ -z "${PTXDIST_QUIET}" ]; then
> -                               ptxd_make "${@}" 4>&- |
> -                               # make's stdout on fd0
> -                               tee -a "${PTX_LOGFILE}" 2>&4 4>&- 5>&- 6>&-
> -                               check_pipe_status || return
> -                       else
> -                               exec 4>&-
> -                               ptxd_make "${@}" 1>> "${PTX_LOGFILE}"
> -                       fi
> -               } 2>&1 1>&3 3>&- 7>> "${PTX_LOGFILE}" |
> -               # make's stderr on fd0
> -               tee -a "${PTX_LOGFILE}" 1>&2 3>&- 4>&- 5>&- 6>&-
> -               check_pipe_status || return
> -       } 3>&1 4>&2 5>&1 6>&2
> -}
>
> to this implementation
>
> +ptxd_make_log() {(
> +       # stdout only
> +       exec {PTXDIST_FD_STDOUT}>&1
> +       # stderr only
> +       exec {PTXDIST_FD_STDERR}>&2
>

missing $
try:
exec ${PTXDIST_FD_STDOUT}>&1
exec ${PTXDIST_FD_STDERR}>&2

[-- Attachment #1.2: Type: text/html, Size: 2901 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [ptxdist] (no subject)
@ 2015-02-21 23:07 Rüdiger, Christoph
  2015-02-21 23:11 ` Jon Ringle
  2015-02-22  9:38 ` Michael Olbrich
  0 siblings, 2 replies; 29+ messages in thread
From: Rüdiger, Christoph @ 2015-02-21 23:07 UTC (permalink / raw)
  To: ptxdist

Hello,

I'm trying to use ptxdist on a Mac OS X system to get rid of the Linux VM just for compiling things. Here is the thing I stumbled upon because I don't get the intention and therefore struggle to find a patch.

The git commit 0dc57566bc5a25d2b086de333844a3c00addf0e4 from 2012-12-13 changed the body of the ptxd_make_log() function in scripts/libptxdist.sh from this implementation

-ptxd_make_log() {
-       #
-       # fd3 == stdout to logfile
-       # fd4 == stderr to logfile
-       # fd5 == clean stdout
-       # fd6 == clean stderr
-       #
-       {
-               export PTXDIST_FD_STDOUT=5
-               export PTXDIST_FD_STDERR=6
-               export PTXDIST_FD_LOGFILE=7
-               {
-                       if [ -z "${PTXDIST_QUIET}" ]; then
-                               ptxd_make "${@}" 4>&- |
-                               # make's stdout on fd0
-                               tee -a "${PTX_LOGFILE}" 2>&4 4>&- 5>&- 6>&-
-                               check_pipe_status || return
-                       else
-                               exec 4>&-
-                               ptxd_make "${@}" 1>> "${PTX_LOGFILE}"
-                       fi
-               } 2>&1 1>&3 3>&- 7>> "${PTX_LOGFILE}" |
-               # make's stderr on fd0
-               tee -a "${PTX_LOGFILE}" 1>&2 3>&- 4>&- 5>&- 6>&-
-               check_pipe_status || return
-       } 3>&1 4>&2 5>&1 6>&2
-}

to this implementation

+ptxd_make_log() {(
+       # stdout only
+       exec {PTXDIST_FD_STDOUT}>&1
+       # stderr only
+       exec {PTXDIST_FD_STDERR}>&2
+       # logfile only
+       exec 9>> "${PTX_LOGFILE}"
+       export PTXDIST_FD_STDOUT
+       export PTXDIST_FD_STDERR
+       export PTXDIST_FD_LOGFILE=9
+
+       if [ -z "${PTXDIST_QUIET}" ]; then
+               # stdout and logfile
+               exec {logout}> >(tee -a "${PTX_LOGFILE}")
+       else
+               # logfile only
+               exec {logout}>> "${PTX_LOGFILE}"
+       fi
+       # stderr and logfile
+       exec {logerr}> >(tee -a "${PTX_LOGFILE}" >&2)
+
+       ptxd_make "${@}" 1>&${logout} 2>&${logerr}
+)}


Now, my bash is complaining at the first exec command:

> exec: {PTXDIST_FD_STDOUT}: not found


To me, it looks fully understandable, because {PTXDIST_FD_STDOUT} is an ill-formed brace expansion and is therefore ignored. But why is the Linux (Ubuntu 12.04) not complaining about?

What is the intention of this brace usage here?

However, an
> echo a{b,c,d}e
expands on both machines to "abe ace ade" and an
> echo {logout}
gets ignored on both machines. Output is just "{logout}".

Best regards,
Christoph

-- 
ThyssenKrupp Elevator Innovation GmbH
PDC Neuhausen
TKEI Elevator Control
Bernhaeuser Str. 45
73765 Neuhausen, Germany
 
Phone +49 7158 12-2615
christoph.ruediger@thyssenkrupp.com
 
Company domicile: Essen      Commercial register: Essen HRB 20 839
Postal address: ThyssenKrupp Allee 1, 45143 Essen, Germany
Executive Board: Gerhard Thumm, Katrin Huenger, Philippe Choleau
 
-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [ptxdist] (no subject)
  2012-10-15  9:30 Alexander Dahl
@ 2012-10-15 10:15 ` Alexander Dahl
  0 siblings, 0 replies; 29+ messages in thread
From: Alexander Dahl @ 2012-10-15 10:15 UTC (permalink / raw)
  To: ptxdist

Am 2012-10-15 11:30, schrieb Alexander Dahl:
> second version of those patches, incorporating suggested changes.

Sorry for leaving the subject empty, I blame my nose sneezing the whole
day. ;-)

A

-- 
»With the first link, the chain is forged. The first speech censured,
the first thought forbidden, the first freedom denied, chains us all
irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie)
*** GnuPG-FP: 02C8 A590 7FE5 CA5F 3601  D1D5 8FBA 7744 CC87 10D0 ***

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [ptxdist] (no subject)
@ 2012-10-15  9:30 Alexander Dahl
  2012-10-15 10:15 ` Alexander Dahl
  0 siblings, 1 reply; 29+ messages in thread
From: Alexander Dahl @ 2012-10-15  9:30 UTC (permalink / raw)
  To: ptxdist

Hei hei,

second version of those patches, incorporating suggested changes.

Greets
Alex

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [ptxdist] (no subject)
@ 2012-04-26 19:41 Ali Beddah
  0 siblings, 0 replies; 29+ messages in thread
From: Ali Beddah @ 2012-04-26 19:41 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #1.2: Type: text/html, Size: 26 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [ptxdist] (no subject)
       [not found] <WC20111103170332.35000F@rsi-elektrotechnik.dedd a simple QML demo application [V2]>
@ 2011-11-04  7:48 ` Josef Holzmayr
  0 siblings, 0 replies; 29+ messages in thread
From: Josef Holzmayr @ 2011-11-04  7:48 UTC (permalink / raw)
  To: ptxdist, jbe

[-- Attachment #1: Type: text/plain, Size: 693 bytes --]


No functional changes, just some smaller "beautifications":
- Package brings own init scripts for sysv and systemd now
- install_tree is used instead of find + install_copy
- some dependencies have been added, expecially QT4_DECLARATIVE
- squashed into one commit


-- 
_____________________________________________________________
R-S-I Elektrotechnik GmbH & Co. KG
Woelkestrasse 11
D-85301 Schweitenkirchen
Fon: +49 8444 9204-0
Fax: +49 8444 9204-50
www.rsi-elektrotechnik.de

_____________________________________________________________
Amtsgericht Ingolstadt - GmbH: HRB 191328 - KG: HRA 170363
Gesch�ftsf�hrer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg
USt-IdNr.: DE 128592548



[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2021-01-24 10:37 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-24 10:36 [ptxdist] (no subject) flix.ptxdist
  -- strict thread matches above, loose matches on Subject: below --
2018-12-11  7:41 [ptxdist] [PATCH 1/2] rules: polkit: Fix incorrect installation path Michael Olbrich
2018-12-17  8:26 ` [ptxdist] (no subject) Dold, Wolfram
     [not found] <829880836.3299556.1488275043753.ref@mail.yahoo.com>
2017-02-28  9:44 ` fredy zavis
2017-02-28 10:23   ` Juergen Borleis
2015-03-26 13:11 carsten.schlote
2015-04-02 16:22 ` Michael Olbrich
2015-02-21 23:07 Rüdiger, Christoph
2015-02-21 23:11 ` Jon Ringle
2015-02-21 23:29   ` Rüdiger, Christoph
2015-02-21 23:43     ` Rüdiger, Christoph
2015-02-22  9:38 ` Michael Olbrich
2015-02-22 19:17   ` Christoph Rüdiger
2015-02-22 23:38     ` Anders Montonen
2015-02-23  8:33       ` Michael Olbrich
2015-02-23  9:13         ` Rüdiger, Christoph
2015-02-23 11:24           ` Michael Olbrich
2015-02-24 21:28             ` Rüdiger, Christoph
2015-02-26 12:23               ` Michael Olbrich
2015-02-27  8:48                 ` Rüdiger, Christoph
2015-02-27  9:06                   ` Michael Olbrich
2015-02-27  9:24                     ` Rüdiger, Christoph
2015-02-27 10:32                       ` Juergen Borleis
2015-02-27 15:36                       ` Michael Olbrich
2015-02-27  9:23                   ` Juergen Borleis
2015-02-27  9:31                     ` Rüdiger, Christoph
2012-10-15  9:30 Alexander Dahl
2012-10-15 10:15 ` Alexander Dahl
2012-04-26 19:41 Ali Beddah
     [not found] <WC20111103170332.35000F@rsi-elektrotechnik.dedd a simple QML demo application [V2]>
2011-11-04  7:48 ` Josef Holzmayr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox