Re: Trying to cross compile glib-2.18.2 for ARM
Hi Enrico, On Fri, 13 Aug 2010 23:30:51 +0200 you wrote: That's silly! If the function is there and does not behave the specified way, the providing package (in this case libc) is simply broken and has to be fixed. It's that simple. No, that's not valid, and you're being a fascist. GTK endeavours to work on as wide a range of systems as possible, and therefore NEEDS to verify whether the things it uses are correctly available. If you don't do that, if you take the your system is broken, tough approach that you advocate, then you are antagonising potential users for the sake of some ludicrous expectation that there is only one true way. You might as well be Microsoft. *If* you really want some sanity test, why aren't they run in the 'make test' pass ? Because it's too late, and because most people don't do it. Checking everything in configure leads to rapid detection of problems, even if the diagnosis gets tough on cross-compile. Also, when cross-compiling, 'make test' has problems of its own! Now stop ranting and think a bit deeper. ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Trying to cross compile glib-2.18.2 for ARM
* Chuck Kuecker ckuec...@ckent.org wrote: Hi, checking for posix getpwuid_r... (cached) yes checking for posix getgrgid_r... configure: error: in `/opt/Freescale1/ltib/rpm/BUILD/glib-2.18.2': configure: error: cannot run test program while cross compiling See `config.log' for more details. error: Bad exit status from /opt/Freescale1/ltib/tmp/rpm-tmp.29960 (% build) That's because certain people missed the last decade and still assume that the building system is identical (yes, identical and not just equal) with the target system. General braindead misconception. Solution: get rid of all the AC_TRY_RUN()'s in configure.ac+friends. There are better ways to do this. cu -- -- Enrico Weigelt, metux IT service -- http://www.metux.de/ phone: +49 36207 519931 email: weig...@metux.de mobile: +49 151 27565287 icq: 210169427 skype: nekrad666 -- Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme -- ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Trying to cross compile glib-2.18.2 for ARM
* Chuck Kuecker ckuec...@ckent.org wrote: I took a look at QEMU - it appears to lead to me needing to learn yet another system. but not getting me anywhere with my project. Ah, the solution for a conceptionally broken crosscompile support (hmm, why the hell do we need to explicitly support it at all, why isn't that inherent by clean software design ?) is telling people not trying to do crosscompiling at all ? ;-o No, don't let the jerks teach you such crap. We're talking about a serious misdesign here, that should be fixed. Really: a major bug. As soon as things like AC_TRY_RUN() appear, the package is broken. Period. cu -- -- Enrico Weigelt, metux IT service -- http://www.metux.de/ phone: +49 36207 519931 email: weig...@metux.de mobile: +49 151 27565287 icq: 210169427 skype: nekrad666 -- Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme -- ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Trying to cross compile glib-2.18.2 for ARM
* Robert Pearce r...@bdt-home.demon.co.uk wrote: It's not glib make, it's the configure script. In order to confirm whether glib can use a POSIX compliant getgrgid_r the configure script has to build and run a test program to check for compliance. For most things it's enough to compile the test, but for some compliance checks the program must actually be run on the target system. That's rather hard for configure to do when cross-compiling. That's silly! If the function is there and does not behave the specified way, the providing package (in this case libc) is simply broken and has to be fixed. It's that simple. *If* you really want some sanity test, why aren't they run in the 'make test' pass ? For the 'make test' it is clear that it has to run on the actual target, build and install has to run properly on any other system (w/ proper cross-toolchain). Making silly assumptions like that the building system is identical with the target completely breaks this. cu -- -- Enrico Weigelt, metux IT service -- http://www.metux.de/ phone: +49 36207 519931 email: weig...@metux.de mobile: +49 151 27565287 icq: 210169427 skype: nekrad666 -- Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme -- ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Trying to cross compile glib-2.18.2 for ARM
Sergei Steshenko wrote: --- On Sun, 4/18/10, Chuck Kuecker ckuec...@ckent.org wrote: From: Chuck Kuecker ckuec...@ckent.org Subject: Trying to cross compile glib-2.18.2 for ARM To: gtk-list@gnome.org Date: Sunday, April 18, 2010, 3:27 PM Hello, I am working with a Freescale i.MX27 ARM processor running Linux 2.6.22. I want to upgrade the Freescale-supplied version of gstreamer to a later version to get functionality they left out. The gstreamer build asks for a newer version of glib than the existing build, so I modified the build files to use glib-2.18.2. The build script runs OK until it gets to this part: checking for posix getpwuid_r... (cached) yes checking for posix getgrgid_r... configure: error: in `/opt/Freescale1/ltib/rpm/BUILD/glib-2.18.2': configure: error: cannot run test program while cross compiling See `config.log' for more details. error: Bad exit status from /opt/Freescale1/ltib/tmp/rpm-tmp.29960 (% build) The config.log file pretty much repeats the above messages, and adds all the cache variables. If anyone wants to see that file, I can post it - 250 Kb. Is there a compiler flag or build option to fix this? I don't see anything obvios in the build documentation. Chuck Kuecker Well, the message is self-explanatory. You might consider running (Debian) ARM image in QEMU and compiling natively inside the virtual machine. Regards, Sergei. I took a look at QEMU - it appears to lead to me needing to learn yet another system. but not getting me anywhere with my project. What, exactly, are the 'test programs' that the glib make tries to run? There must have been a way to disable this in the older version of glib (glib-2.12.11) packaged with the Freescale ltib build, since that build does not have this issue. Was this an added feature of newer glib releases? If I can simply (or not so simply!) turn off the test feature, and get the library to compile, I can advance with my project. Right now, I'm stumped. Chuck Kuecker ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Trying to cross compile glib-2.18.2 for ARM
Hi Chuck, On Mon, 19 Apr 2010 09:54:16 -0600 you wrote: checking for posix getpwuid_r... (cached) yes checking for posix getgrgid_r... configure: error: in `/opt/Freescale1/ltib/rpm/BUILD/glib-2.18.2': configure: error: cannot run test program while cross compiling See `config.log' for more details. error: Bad exit status from /opt/Freescale1/ltib/tmp/rpm-tmp.29960 (% build) snip What, exactly, are the 'test programs' that the glib make tries to run? There must have been a way to disable this in the older version of glib (glib-2.12.11) packaged with the Freescale ltib build, since that build does not have this issue. Was this an added feature of newer glib releases? It's not glib make, it's the configure script. In order to confirm whether glib can use a POSIX compliant getgrgid_r the configure script has to build and run a test program to check for compliance. For most things it's enough to compile the test, but for some compliance checks the program must actually be run on the target system. That's rather hard for configure to do when cross-compiling. It may be possible to explicitly tell configure whether the test would pass (or rather, to explicitly tell it whether to use the function) but it may not. The fact that older versions didn't suffer this problem could be down to older versions not needing that function, or it may be the availability was incorrectly assumed rather than tested. And that's about as much as I know on the topic! Rob ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Trying to cross compile glib-2.18.2 for ARM
Hi Chuck, as few others have stepped in: If you are in luck there maybe a --disable-tests option for ./configure. (I am sorry I should have checked in your version glib sources but my time is being for by a client just now). If not look in the created make file (from ./configure) and hack it where it is trying to do the tests. I have used this shoddy technique before when cross-building with configure.ac files that don't recognise the implication of different --build, --host and --target architectures! The real solution is to edit the configure.ac and add the 'missing' --disable-tests option or create this impicitly from non-compatible ---build -target --host combination. If you find that the configure.ac is missing this oiption and you choose to fix this properly, please put your name in lights and submit the patch for inclusion, we cross -developers need all the help we can get! :-) I hope that at least gives you a solution for now. Leon On 20 April 2010 01:54, Chuck Kuecker ckuec...@ckent.org wrote: Sergei Steshenko wrote: --- On Sun, 4/18/10, Chuck Kuecker ckuec...@ckent.org wrote: From: Chuck Kuecker ckuec...@ckent.org Subject: Trying to cross compile glib-2.18.2 for ARM To: gtk-list@gnome.org Date: Sunday, April 18, 2010, 3:27 PM Hello, I am working with a Freescale i.MX27 ARM processor running Linux 2.6.22. I want to upgrade the Freescale-supplied version of gstreamer to a later version to get functionality they left out. The gstreamer build asks for a newer version of glib than the existing build, so I modified the build files to use glib-2.18.2. The build script runs OK until it gets to this part: checking for posix getpwuid_r... (cached) yes checking for posix getgrgid_r... configure: error: in `/opt/Freescale1/ltib/rpm/BUILD/glib-2.18.2': configure: error: cannot run test program while cross compiling See `config.log' for more details. error: Bad exit status from /opt/Freescale1/ltib/tmp/rpm-tmp.29960 (% build) The config.log file pretty much repeats the above messages, and adds all the cache variables. If anyone wants to see that file, I can post it - 250 Kb. Is there a compiler flag or build option to fix this? I don't see anything obvios in the build documentation. Chuck Kuecker Well, the message is self-explanatory. You might consider running (Debian) ARM image in QEMU and compiling natively inside the virtual machine. Regards, Sergei. I took a look at QEMU - it appears to lead to me needing to learn yet another system. but not getting me anywhere with my project. What, exactly, are the 'test programs' that the glib make tries to run? There must have been a way to disable this in the older version of glib (glib-2.12.11) packaged with the Freescale ltib build, since that build does not have this issue. Was this an added feature of newer glib releases? If I can simply (or not so simply!) turn off the test feature, and get the library to compile, I can advance with my project. Right now, I'm stumped. Chuck Kuecker ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Trying to cross compile glib-2.18.2 for ARM
Thanks, Leon. That explains the problem a bit better for me. I am fairly new to Linux build scripts, so finding where everything is hiding is a major accomplishment for me. Chuck Kuecker Leon Opit wrote: Hi Chuck, as few others have stepped in: If you are in luck there maybe a --disable-tests option for ./configure. (I am sorry I should have checked in your version glib sources but my time is being for by a client just now). If not look in the created make file (from ./configure) and hack it where it is trying to do the tests. I have used this shoddy technique before when cross-building with configure.ac http://configure.ac files that don't recognise the implication of different --build, --host and --target architectures! The real solution is to edit the configure.ac http://configure.ac and add the 'missing' --disable-tests option or create this impicitly from non-compatible ---build -target --host combination. If you find that the configure.ac http://configure.ac is missing this oiption and you choose to fix this properly, please put your name in lights and submit the patch for inclusion, we cross -developers need all the help we can get! :-) I hope that at least gives you a solution for now. Leon On 20 April 2010 01:54, Chuck Kuecker ckuec...@ckent.org mailto:ckuec...@ckent.org wrote: Sergei Steshenko wrote: --- On Sun, 4/18/10, Chuck Kuecker ckuec...@ckent.org mailto:ckuec...@ckent.org wrote: From: Chuck Kuecker ckuec...@ckent.org mailto:ckuec...@ckent.org Subject: Trying to cross compile glib-2.18.2 for ARM To: gtk-list@gnome.org mailto:gtk-list@gnome.org Date: Sunday, April 18, 2010, 3:27 PM Hello, I am working with a Freescale i.MX27 ARM processor running Linux 2.6.22. I want to upgrade the Freescale-supplied version of gstreamer to a later version to get functionality they left out. The gstreamer build asks for a newer version of glib than the existing build, so I modified the build files to use glib-2.18.2. The build script runs OK until it gets to this part: checking for posix getpwuid_r... (cached) yes checking for posix getgrgid_r... configure: error: in `/opt/Freescale1/ltib/rpm/BUILD/glib-2.18.2': configure: error: cannot run test program while cross compiling See `config.log' for more details. error: Bad exit status from /opt/Freescale1/ltib/tmp/rpm-tmp.29960 (% build) The config.log file pretty much repeats the above messages, and adds all the cache variables. If anyone wants to see that file, I can post it - 250 Kb. Is there a compiler flag or build option to fix this? I don't see anything obvios in the build documentation. Chuck Kuecker Well, the message is self-explanatory. You might consider running (Debian) ARM image in QEMU and compiling natively inside the virtual machine. Regards, Sergei. I took a look at QEMU - it appears to lead to me needing to learn yet another system. but not getting me anywhere with my project. What, exactly, are the 'test programs' that the glib make tries to run? There must have been a way to disable this in the older version of glib (glib-2.12.11) packaged with the Freescale ltib build, since that build does not have this issue. Was this an added feature of newer glib releases? If I can simply (or not so simply!) turn off the test feature, and get the library to compile, I can advance with my project. Right now, I'm stumped. Chuck Kuecker ___ gtk-list mailing list gtk-list@gnome.org mailto:gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Trying to cross compile glib-2.18.2 for ARM
Robert Pearce wrote: Hi Chuck, On Mon, 19 Apr 2010 09:54:16 -0600 you wrote: checking for posix getpwuid_r... (cached) yes checking for posix getgrgid_r... configure: error: in `/opt/Freescale1/ltib/rpm/BUILD/glib-2.18.2': configure: error: cannot run test program while cross compiling See `config.log' for more details. error: Bad exit status from /opt/Freescale1/ltib/tmp/rpm-tmp.29960 (% build) snip What, exactly, are the 'test programs' that the glib make tries to run? There must have been a way to disable this in the older version of glib (glib-2.12.11) packaged with the Freescale ltib build, since that build does not have this issue. Was this an added feature of newer glib releases? It's not glib make, it's the configure script. In order to confirm whether glib can use a POSIX compliant getgrgid_r the configure script has to build and run a test program to check for compliance. For most things it's enough to compile the test, but for some compliance checks the program must actually be run on the target system. That's rather hard for configure to do when cross-compiling. It may be possible to explicitly tell configure whether the test would pass (or rather, to explicitly tell it whether to use the function) but it may not. The fact that older versions didn't suffer this problem could be down to older versions not needing that function, or it may be the availability was incorrectly assumed rather than tested. And that's about as much as I know on the topic! Rob Thanks, Rob. That makes sense - it can't run an ARM binary on a x86 platform. I can test on the target system to see if it supports the POSIX function - if so, I can modify the configuration script to skip the test. While I was poking around here, I found an alternate solution to my problem that does not require an updated glib. My gst-plugins-good package was the wrong version - I used a newer release, and I've got my functionality now. Thanks to everyone! Chuck Kuecker ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Trying to cross compile glib-2.18.2 for ARM
--- On Mon, 4/19/10, Chuck Kuecker ckuec...@ckent.org wrote: From: Chuck Kuecker ckuec...@ckent.org Subject: Re: Trying to cross compile glib-2.18.2 for ARM To: gtk-list@gnome.org Date: Monday, April 19, 2010, 4:27 PM Robert Pearce wrote: Hi Chuck, On Mon, 19 Apr 2010 09:54:16 -0600 you wrote: checking for posix getpwuid_r... (cached) yes checking for posix getgrgid_r... configure: error: in `/opt/Freescale1/ltib/rpm/BUILD/glib-2.18.2': configure: error: cannot run test program while cross compiling See `config.log' for more details. error: Bad exit status from /opt/Freescale1/ltib/tmp/rpm-tmp.29960 (% build) snip What, exactly, are the 'test programs' that the glib make tries to run? There must have been a way to disable this in the older version of glib (glib-2.12.11) packaged with the Freescale ltib build, since that build does not have this issue. Was this an added feature of newer glib releases? It's not glib make, it's the configure script. In order to confirm whether glib can use a POSIX compliant getgrgid_r the configure script has to build and run a test program to check for compliance. For most things it's enough to compile the test, but for some compliance checks the program must actually be run on the target system. That's rather hard for configure to do when cross-compiling. It may be possible to explicitly tell configure whether the test would pass (or rather, to explicitly tell it whether to use the function) but it may not. The fact that older versions didn't suffer this problem could be down to older versions not needing that function, or it may be the availability was incorrectly assumed rather than tested. And that's about as much as I know on the topic! Rob Thanks, Rob. That makes sense - it can't run an ARM binary on a x86 platform. I can test on the target system to see if it supports the POSIX function - if so, I can modify the configuration script to skip the test. While I was poking around here, I found an alternate solution to my problem that does not require an updated glib. My gst-plugins-good package was the wrong version - I used a newer release, and I've got my functionality now. Thanks to everyone! Chuck Kuecker FWIW, if gtk+ documentation says it can be cross-built, but in reality it can't because of the problems you've encountered, please file a bug against gtk+. Thanks, Sergei. ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Trying to cross compile glib-2.18.2 for ARM
Sergei Steshenko wrote: --- On Mon, 4/19/10, Chuck Kuecker ckuec...@ckent.org wrote: Thanks, Rob. That makes sense - it can't run an ARM binary on a x86 platform. I can test on the target system to see if it supports the POSIX function - if so, I can modify the configuration script to skip the test. While I was poking around here, I found an alternate solution to my problem that does not require an updated glib. My gst-plugins-good package was the wrong version - I used a newer release, and I've got my functionality now. Thanks to everyone! Chuck Kuecker FWIW, if gtk+ documentation says it can be cross-built, but in reality it can't because of the problems you've encountered, please file a bug against gtk+. Thanks, Sergei. Well, so far, so good. glib built fine, and now I am building the updated gstreamer packages. Now - the big question is - will it run on my platform? I will know early tomorrow. Chuck Kuecker ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Trying to cross compile glib-2.18.2 for ARM
--- On Sun, 4/18/10, Chuck Kuecker ckuec...@ckent.org wrote: From: Chuck Kuecker ckuec...@ckent.org Subject: Trying to cross compile glib-2.18.2 for ARM To: gtk-list@gnome.org Date: Sunday, April 18, 2010, 3:27 PM Hello, I am working with a Freescale i.MX27 ARM processor running Linux 2.6.22. I want to upgrade the Freescale-supplied version of gstreamer to a later version to get functionality they left out. The gstreamer build asks for a newer version of glib than the existing build, so I modified the build files to use glib-2.18.2. The build script runs OK until it gets to this part: checking for posix getpwuid_r... (cached) yes checking for posix getgrgid_r... configure: error: in `/opt/Freescale1/ltib/rpm/BUILD/glib-2.18.2': configure: error: cannot run test program while cross compiling See `config.log' for more details. error: Bad exit status from /opt/Freescale1/ltib/tmp/rpm-tmp.29960 (% build) The config.log file pretty much repeats the above messages, and adds all the cache variables. If anyone wants to see that file, I can post it - 250 Kb. Is there a compiler flag or build option to fix this? I don't see anything obvios in the build documentation. Chuck Kuecker Well, the message is self-explanatory. You might consider running (Debian) ARM image in QEMU and compiling natively inside the virtual machine. Regards, Sergei. ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Trying to cross compile glib-2.18.2 for ARM
Sergei Steshenko wrote: --- On Sun, 4/18/10, Chuck Kuecker ckuec...@ckent.org wrote: From: Chuck Kuecker ckuec...@ckent.org Subject: Trying to cross compile glib-2.18.2 for ARM To: gtk-list@gnome.org Date: Sunday, April 18, 2010, 3:27 PM Hello, I am working with a Freescale i.MX27 ARM processor running Linux 2.6.22. I want to upgrade the Freescale-supplied version of gstreamer to a later version to get functionality they left out. The gstreamer build asks for a newer version of glib than the existing build, so I modified the build files to use glib-2.18.2. The build script runs OK until it gets to this part: checking for posix getpwuid_r... (cached) yes checking for posix getgrgid_r... configure: error: in `/opt/Freescale1/ltib/rpm/BUILD/glib-2.18.2': configure: error: cannot run test program while cross compiling See `config.log' for more details. error: Bad exit status from /opt/Freescale1/ltib/tmp/rpm-tmp.29960 (% build) The config.log file pretty much repeats the above messages, and adds all the cache variables. If anyone wants to see that file, I can post it - 250 Kb. Is there a compiler flag or build option to fix this? I don't see anything obvios in the build documentation. Chuck Kuecker Well, the message is self-explanatory. You might consider running (Debian) ARM image in QEMU and compiling natively inside the virtual machine. Regards, Sergei. If I do that, I can include the binary instead of the package, I suppose? Then, all I need to find out is how to include the binary in the ltib build. That would make some things easier for me, actually. Thanks! Chuck Kuecker ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list