gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gcl-devel] running program compiled by GCL via Wine


From: Robert Dodier
Subject: Re: [Gcl-devel] running program compiled by GCL via Wine
Date: Sat, 19 Oct 2013 08:18:15 -0700

On Sat, Oct 19, 2013 at 4:55 AM, Camm Maguire <address@hidden> wrote:

> Now I think you've forgotten to export your CC and PATH variables as
> explained in README.wine.

Oh -- right.

Speaking of README.wine, it appears that
that the method stated there (update-binfmts --enable wine)
only works if there is already some Wine-related configuration
in place. In the absence of that,

>> # cd /proc/sys/fs/binfmt_misc
>> # echo ':DOSWin:M::MZ::/usr/local/bin/wine:' > register

is one possible workaround.

OK, so I can get farther still. But I bumped into a couple
more things. One is that I get a warning that sbrk is undefined.
I guess it's not strictly required? Another is that the
test program to figure out TYPE_BITS failed. Looking
at the failed program in config.log, I see that $obj_align
has a trailing carriage return (ctrl-M) character.
I modified configure as follows

$ diff -u configure.original configure
--- configure.original    2013-10-19 07:02:40.034778778 -0700
+++ configure    2013-10-19 07:03:15.610955194 -0700
@@ -7764,7 +7764,7 @@
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
-  obj_align=`cat conftest1`
+  obj_align=`cat conftest1 | tr -d '\r'`
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $obj_align" >&5
 $as_echo "$obj_align" >&6; }

Ta-da! now configure runs all the way to completion. All done!

... well, now I have to run make. Which fails with this:

/usr/bin/i586-mingw32msvc-gcc -I../h -I../gcl-tk -o ../bin/dpp.exe ../bin/dpp.c
In file included from ../bin/dpp.c:67:
../h/config.h:221: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘extern’

Looks like config.h has a stray 'n' in it? I patched it like this:

$ diff -u h/config.h-original h/config.h
--- h/config.h-original    2013-10-19 07:35:44.192617657 -0700
+++ h/config.h    2013-10-19 07:37:16.725076523 -0700
@@ -191,7 +191,7 @@
    (a_)=GCLExeName();\
 } while(0)

-n/* Needed if optimiser moves object initialisation code around. */
+/* Needed if optimiser moves object initialisation code around. */
 #define FIND_INIT \
 { if (*ptr==0 && (NTYPE(sym) == TEXT_NSCN) && sym->n_value ) \
   { char tem [9]; \

and ran make again. Now it seems to compile a lot of stuff
and then it dies with:

/usr/bin/i586-mingw32msvc-gcc -c -fsigned-char  -pipe -Wall
-fno-zero-initialized-in-bss -mms-bitfields  -O3  -march=i686
-mfpmath=387 -I/home/robert/tmp/gcl-git/gcl/gcl/o -I../h -I../gcl-tk
main.c
main.c:70: error: ‘PATH_MAX’ undeclared here (not in a function)
main.c: In function ‘init_boot’:
main.c:265: warning: implicit declaration of function ‘dlopen’
main.c:265: error: ‘RTLD_LAZY’ undeclared (first use in this function)
main.c:265: error: (Each undeclared identifier is reported only once
main.c:265: error: for each function it appears in.)
main.c:265: error: ‘RTLD_GLOBAL’ undeclared (first use in this function)
main.c:265: warning: assignment makes pointer from integer without a cast
main.c:266: warning: implicit declaration of function ‘dlerror’
main.c:266: warning: format ‘%s’ expects type ‘char *’, but argument 2
has type ‘int’
main.c:267: warning: implicit declaration of function ‘dlsym’
main.c:267: warning: assignment makes pointer from integer without a cast
main.c:268: warning: format ‘%s’ expects type ‘char *’, but argument 2
has type ‘int’
main.c: In function ‘initlisp’:
main.c:753: error: ‘RTLD_LAZY’ undeclared (first use in this function)
main.c:753: error: ‘RTLD_GLOBAL’ undeclared (first use in this function)
make[1]: *** [main.o] Error 1

Suggestions?

best

Robert Dodier



reply via email to

[Prev in Thread] Current Thread [Next in Thread]