Cannot cross-compile VICE anymore.
Versatile Commodore Emulator
Brought to you by:
blackystardust,
gpz
I just discovered that I cannot cross compile anymore VICE.
This is the message that I'm getting:
checking for native OpenMP and multiple cores... configure: error: cannot run test program while cross compiling See `config.log' for more details
I did this very quick fix into the configure script for fixing the trouble:
Index: vice/configure.ac =================================================================== --- vice/configure.ac (revisione 41098) +++ vice/configure.ac (copia di lavoro) @@ -1083,6 +1083,7 @@ VICE_CFLAGS="$VICE_CFLAGS -fopenmp" VICE_CXXFLAGS="$VICE_CXXFLAGS -fopenmp" VICE_LDFLAGS="$VICE_LDFLAGS -fopenmp" ], + [ AC_MSG_RESULT(no) ], [ AC_MSG_RESULT(no) ]) CFLAGS=$ORIG_CFLAGS
But probably, it is better to do it better, by adding an option --with-openmp=on/off/auto
for configuring this stuff (auto will be the default selection).
What do you think?
yes such option should be added (you might want openmp enabled even with crosscompiling, but then it shouldnt try to run test programs, obviously)
Yes, the
AC_TRY_RUN()
has to be executed only if the option is set toauto
.Otherwise,
have_openmp
will be set directly with the vale provided into--with-openmp
. This is also my idea.I'd suggest
--enable-openmp=[yes|no|auto]
, since openmp appears to be a compiler switch/API rather than a separate library one must install. Autotools uses--with
for features that require extra libraries/programs,--enable
is for enabling features that don't require anything extra.Looking through configure I noticed the following comment:
So perhaps the switch should be
--enable-openmp [default=yes]
, dropping the autodetect since it requires a library on MacOS that users might not be aware of. That means configuring VICE on MacOS without OpenMP installed will alert users about possibly degraded performance.Any thoughts on this? I personally prefer the way of least surprise, in other words: no autodetect if we can avoid it.
i don't see any performance difference in win 7?
is this more a PoC at the moment?
Basically just POC at the moment. It's only used to speed up the 'Unfiltered' double size render which is simple enough for this to be easy to achieve. I'm looking at using it elsewhere, including a couple of places within resid.
On Windows and Linux it can be expected to be available.
For now, in r41104 i've just relaxed it to an AC_TRY_LINK. Should fix cross compile if this was the only issue
Looks good to me. I see that the MacOS build instructions include installing libomp, so everything works out.
Excuse me, have you evaluated the chance to use
AC_OPENMP
provided by autotools?Since the macro provides several variables like
OPENMP_CFLAGS
, you could easily integrate extra configuration from the command line or integrate additional options if the platform needs them.That's great, thanks for letting me know about that. Much simpler, I'll look into it.