FTGL and fedora-mingw

Chris Thielen chris at epiar.net
Wed Oct 6 21:20:51 UTC 2010


  Thanks Erik, it seems both AC_TRY_RUN and it's replacement macro 
AC_RUN_IFELSE (replacement according to this page: 
http://www.gnu.org/software/hello/manual/autoconf/Obsolete-Macros.html), 
have an optional extra argument for cross-compiling situations, which I 
added. As one cannot typically run tests in a cross-compiling 
environment, I thought it appropriate to set the return result to 
"unknown" (as opposed to "yes" and "no") and have that particular exit 
code ignored. I'd appreciate any comment letting me know if that fix is 
unorthodox.

With that, FTGL's SVN seems to configure and build correctly under 
Fedora 13's mingw-configure.

On 10/06/2010 01:40 PM, Erik van Pienbroek wrote:
> Chris Thielen schreef op wo 06-10-2010 om 11:14 [-0700]:
>> I've never used BC_COMPILER_AND_LINKER_RECOGNIZES personally, but it
>> seems to be used in a few different open source packages, though the
>> compiler.m4 file it comes from seems distributed with each package
>> instead of being part of the system. That compiles a test which it then
>> tries to run, issuing the error:
>>
>> checking if compiler and linker recognize -W -Wall -Wundef -Wfloat-equal
>>    -Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wsign-compare
>> -Winline -Waggregate-return... configure: error: in
>> `/usr/local/src/ftgl/trunk':
>> configure: error: cannot run test program while cross compiling
>> See `config.log' for more details.
> Hi Chris,
>
> This error seems to be caused by the fact that the macro in question
> (BC_COMPILER_AND_LINKER_RECOGNIZES) doesn't support cross-compiling. The
> main issue is that it tries to call the autoconf macro AC_TRY_COMMAND.
> This macro detects that we're trying to cross-compile and refuses to
> perform the command. The AC_TRY_RUN autoconf macro also 'suffers' from
> this behaviour. The macro BC_COMPILER_AND_LINKER_RECOGNIZES should
> actually be rewritten so that these 2 mentioned macros won't be used
> anymore.
>
> On the other hand, as these checks are only to check whether the
> toolchain is working correctly it should be possible to drop the
> checks from configure.ac without further side effects.
>
>> Thanks in advance for any advice that can be given. I'm also
>> familiarizing myself with the Fedora package maintainer process and hope
>> to add a mingw32-ftgl package to the repos soon -- which begs a separate
>> question: as FTGL's SVN seems to have cross compiling fixed up a bit
>> better than their last release, would it be inadvisable to construct a
>> package for the repos based on SVN? Is it typical to wait for the next
>> point release?
> Mostly these kind of decisions are up to the maintainer in question
> (that would be you). If you think that a snapshot version is better
> because of certain fixes and you're confident enough that the package is
> stable enough for regular users I don't see any problem.
>
> Kind regards,
>
> Erik van Pienbroek
>
>
>
> _______________________________________________
> mingw mailing list
> mingw at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/mingw



More information about the mingw mailing list