Problems compiling Amaya 11.2 on FreeBSD

View: New views
5 Messages — Rating Filter:   Alert me  

Problems compiling Amaya 11.2 on FreeBSD

by Philipp Ost :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi *,

I have troubles compiling Amaya 11.2 on my FreeBSD machine (8.0-BETA2,
i386).

Here's what I've done so far:
- downloaded amaya-sources-11.2.tgz and unpacked it
- created a directory 'freebsd' under Amaya (as per the README-file)
- ran configure: ../configure --with-gl --enable-system-libwww
--enable-system-raptor
- gmake all

libwww-5.4.0 and raptor-1.4.18 are installed from the ports-tree.

Then the fun begins ;-)
First, it fails due to a redefinition of intptr_t in thot_sys.h at line
257. I commented this out. It then continues happily until it reaches

[snipped lots of stuff]
gmake[3]: Entering directory
`/data/Projekte/Amaya/Amaya11.2/Amaya/freebsd/thotlib'
g++ -O2 -Wall -x c++ -D__cplusplus -D_UNIX -D_GL -D_WX -DHAVE_CONFIG_H
-I.. -I../../amaya/xpm -I../../thotlib/include
-I../../thotlib/internals/var -I../../thotlib/internals/h
-I../../thotlib/internals/f
-I/data/Projekte/Amaya/Amaya11.2/wxWidgets/src/png
-I/data/Projekte/Amaya/Amaya11.2/wxWidgets/src/jpeg
-I/data/Projekte/Amaya/Amaya11.2/wxWidgets/src/tiff
-I/data/Projekte/Amaya/Amaya11.2/Amaya/freebsd/wxWidgets_RELEASE/lib/wx/include/gtk2-unicode-release-static-2.8
-I/data/Projekte/Amaya/Amaya11.2/wxWidgets/include
-I/data/Projekte/Amaya/Amaya11.2/wxWidgets/contrib/include
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread
-D_THREAD_SAFE -I/usr/X11R6/include   -I/usr/local/include/freetype2
-I/usr/local/include  -c ../../thotlib/unicode/ustring.c -o
unicode/ustring.o
.../../thotlib/unicode/ustring.c: In function 'CHARSET
TtaGetLocaleCharset()':
.../../thotlib/unicode/ustring.c:440: error: '_NL_MESSAGES_CODESET' was
not declared in this scope
gmake[3]: *** [unicode/ustring.o] Error 1
gmake[3]: Leaving directory
`/data/Projekte/Amaya/Amaya11.2/Amaya/freebsd/thotlib'
gmake[2]: *** [../thotlib/libThotKernel.a] Error 2
gmake[2]: Leaving directory
`/data/Projekte/Amaya/Amaya11.2/Amaya/freebsd/batch'
gmake[1]: *** [../bin/str] Error 2
gmake[1]: Leaving directory
`/data/Projekte/Amaya/Amaya11.2/Amaya/freebsd/amaya'
$

I looked for _NL_MESSAGES_CODESET on my system but couldn't find
anything. Neither did Google.
Where does this thing come from? How to resolve this?

Thanks a lot in advance.

Regards,
Philipp


smime.p7s (6K) Download Attachment

Re: Problems compiling Amaya 11.2 on FreeBSD

by Vatton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Le mercredi 09 septembre 2009 à 23:16 +0200, Philipp Ost a écrit :

> Hi *,
>
> I have troubles compiling Amaya 11.2 on my FreeBSD machine (8.0-BETA2,
> i386).
>
> Here's what I've done so far:
> - downloaded amaya-sources-11.2.tgz and unpacked it
> - created a directory 'freebsd' under Amaya (as per the README-file)
> - ran configure: ../configure --with-gl --enable-system-libwww
> --enable-system-raptor
> - gmake all
>
> libwww-5.4.0 and raptor-1.4.18 are installed from the ports-tree.
>
> Then the fun begins ;-)
> First, it fails due to a redefinition of intptr_t in thot_sys.h at line
> 257. I commented this out. It then continues happily until it reaches
>
> [snipped lots of stuff]
> gmake[3]: Entering directory
> `/data/Projekte/Amaya/Amaya11.2/Amaya/freebsd/thotlib'
> g++ -O2 -Wall -x c++ -D__cplusplus -D_UNIX -D_GL -D_WX -DHAVE_CONFIG_H
> -I.. -I../../amaya/xpm -I../../thotlib/include
> -I../../thotlib/internals/var -I../../thotlib/internals/h
> -I../../thotlib/internals/f
> -I/data/Projekte/Amaya/Amaya11.2/wxWidgets/src/png
> -I/data/Projekte/Amaya/Amaya11.2/wxWidgets/src/jpeg
> -I/data/Projekte/Amaya/Amaya11.2/wxWidgets/src/tiff
> -I/data/Projekte/Amaya/Amaya11.2/Amaya/freebsd/wxWidgets_RELEASE/lib/wx/include/gtk2-unicode-release-static-2.8
> -I/data/Projekte/Amaya/Amaya11.2/wxWidgets/include
> -I/data/Projekte/Amaya/Amaya11.2/wxWidgets/contrib/include
> -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread
> -D_THREAD_SAFE -I/usr/X11R6/include   -I/usr/local/include/freetype2
> -I/usr/local/include  -c ../../thotlib/unicode/ustring.c -o
> unicode/ustring.o
> .../../thotlib/unicode/ustring.c: In function 'CHARSET
> TtaGetLocaleCharset()':
> .../../thotlib/unicode/ustring.c:440: error: '_NL_MESSAGES_CODESET' was
> not declared in this scope
> gmake[3]: *** [unicode/ustring.o] Error 1
> gmake[3]: Leaving directory
> `/data/Projekte/Amaya/Amaya11.2/Amaya/freebsd/thotlib'
> gmake[2]: *** [../thotlib/libThotKernel.a] Error 2
> gmake[2]: Leaving directory
> `/data/Projekte/Amaya/Amaya11.2/Amaya/freebsd/batch'
> gmake[1]: *** [../bin/str] Error 2
> gmake[1]: Leaving directory
> `/data/Projekte/Amaya/Amaya11.2/Amaya/freebsd/amaya'
> $
>
> I looked for _NL_MESSAGES_CODESET on my system but couldn't find
> anything. Neither did Google.
> Where does this thing come from? How to resolve this?

Normally this value is defined in my system in /usr/include/langinfo.h

>
> Thanks a lot in advance.
>
> Regards,
> Philipp
--
Irene Vatton <Irene.Vatton@...>
INRIA



Re: Problems compiling Amaya 11.2 on FreeBSD

by Philipp Ost :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Irene Vatton wrote:
> Le mercredi 09 septembre 2009 à 23:16 +0200, Philipp Ost a écrit :
[...]
>>I looked for _NL_MESSAGES_CODESET on my system but couldn't find
>>anything. Neither did Google.
>>Where does this thing come from? How to resolve this?
>
>
> Normally this value is defined in my system in /usr/include/langinfo.h

On the systems I have available here (FreeBSD 8.0/9.0, Solaris 10/SXCE
(sparc, amd64) I can't find any reference to _NL_MESSAGES_CODESET in
/usr/include/*.
I was able to get past this point by replacing it with LC_MESSAGES.

However, I now got a new compilation error -- but first I need to look
into it in more detail before I complain again ;-)

Regards,
Philipp


smime.p7s (6K) Download Attachment

Re: Problems compiling Amaya 11.2 on FreeBSD

by Vatton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Le samedi 19 septembre 2009 à 00:45 +0200, Philipp Ost a écrit :

> Irene Vatton wrote:
> > Le mercredi 09 septembre 2009 à 23:16 +0200, Philipp Ost a écrit :
> [...]
> >>I looked for _NL_MESSAGES_CODESET on my system but couldn't find
> >>anything. Neither did Google.
> >>Where does this thing come from? How to resolve this?
> >
> >
> > Normally this value is defined in my system in /usr/include/langinfo.h
>
> On the systems I have available here (FreeBSD 8.0/9.0, Solaris 10/SXCE
> (sparc, amd64) I can't find any reference to _NL_MESSAGES_CODESET in
> /usr/include/*.
> I was able to get past this point by replacing it with LC_MESSAGES.

I suggest to add a -D_FREEBSD option

Change in Amaya/configure.in:
__________________________________________________________
#
# Check for operating system (UNIX / WINDOWS / MACOSX )
# ---------->
# canonicalize the target OS
AMAYAOS="LINUX"
case $target_os in
  aix*)       AMAYAOS="LINUX" ;;
  cygwin*)    AMAYAOS="WINDOWS" ;;
  darwin*)    AMAYAOS="MACOSX" ;;
  freebsd2*)  AMAYAOS="FREEBSD" ;;
  freebsd*)   AMAYAOS="FREEBSD" ;;
  hpux*)      AMAYAOS="LINUX" ;;
  irix*)      AMAYAOS="LINUX" ;;
  linuxaout*) AMAYAOS="LINUX" ;;
  linux*)     AMAYAOS="LINUX" ;;
  mingw32*)   AMAYAOS="WINDOWS" ;;
  netbsd*)    AMAYAOS="LINUX" ;;
  openbsd*)   AMAYAOS="LINUX" ;;
  osf[12]*)   AMAYAOS="LINUX" ;;
  osf*)       AMAYAOS="LINUX" ;;
  solaris2*)  AMAYAOS="FREEBSD" ;;
  sunos4*)    AMAYAOS="FREEBSD" ;;
  ultrix*)    AMAYAOS="LINUX" ;;
esac
AC_SUBST(AMAYAOS)

if test "$AMAYAOS" = "WINDOWS" ; then
  AC_MSG_ERROR(Windows port do not use configure - not yet tested.)
fi

OS_OPTIONS="-D_UNIX" # default is UNIX
case $AMAYAOS in
  LINUX)       OS_OPTIONS="-D_UNIX" ;;
  WINDOWS)     OS_OPTIONS="-D_WINDOWS" ;; # not tested (cygwin or mingw)
  MACOSX)      OS_OPTIONS="-D_UNIX -D_MACOS" ;;
  FREEBSD)     OS_OPTIONS="-D_UNIX -D_FREEBSD" ;;
esac
__________________________________________________________

Change in Amaya/thotlib/unicode/ustring.c:
__________________________________________________________

#if !defined(_MACOS) && !defined(_FREEBSD)
  if (LocaleSystemCharset == UNSUPPORTED_CHARSET)
    {
      char *buffer;
      buffer = nl_langinfo(_NL_MESSAGES_CODESET);
      if (buffer != NULL)
        LocaleSystemCharset = TtaGetCharset(buffer);
    }
#endif /* _MACOS && _FREEBSD */
__________________________________________________________

>
> However, I now got a new compilation error -- but first I need to look
> into it in more detail before I complain again ;-)
>
> Regards,
> Philipp
--
Irene Vatton <Irene.Vatton@...>
INRIA



Re: Problems compiling Amaya 11.2 on FreeBSD

by Philipp Ost :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Irene Vatton wrote:

> Le samedi 19 septembre 2009 à 00:45 +0200, Philipp Ost a écrit :
>> Irene Vatton wrote:
>>> Le mercredi 09 septembre 2009 à 23:16 +0200, Philipp Ost a écrit :
>> [...]
>>>> I looked for _NL_MESSAGES_CODESET on my system but couldn't find
>>>> anything. Neither did Google.
>>>> Where does this thing come from? How to resolve this?
>>>
>>> Normally this value is defined in my system in /usr/include/langinfo.h
>> On the systems I have available here (FreeBSD 8.0/9.0, Solaris 10/SXCE
>> (sparc, amd64) I can't find any reference to _NL_MESSAGES_CODESET in
>> /usr/include/*.
>> I was able to get past this point by replacing it with LC_MESSAGES.
>
> I suggest to add a -D_FREEBSD option
[suggested changes snipped]

I thought about something like this, too. I currently don't have much
time to work on it, but I try to do my best.

Apart from that, the changes I made could need some cleanup too...

Thanks for the help so far!

Philipp



smime.p7s (6K) Download Attachment