Re: 64-Bit Source Port?

Uwe Premer <[email protected]> Wed, 5 Jun 2013 23:25:56 +0000 (UTC)
Newsgroups gmane.network.slrn.user
Organization @ the net
Message-ID <[email protected]>
Am Wed, 5 Jun 2013 16:42:39 -0400 schrieb John E. Davis:
> Uwe Premer <[email protected]> wrote:
>> It is possible to build the makefiles from s-lang, but when I try to
>> compile with mingw32-make it fails with errors depending on wrong variables
>> in slang.h and slang.c so that it isn't possible to get a slang.o and so
>> its missing and make stops.
>
> What errors do you see?

First I began with compiling slang:

---------------------------------X------------------------------------
Setting up environment for MinGW-w64 GCC 64-bit...
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Alle Rechte vorbehalten.

C:\mingw64>cd \Sources\s-lang

C:\Sources\s-lang>mkfiles\m32init.bat
- generating Makefile in src...
- generating Makefile in slsh...
- generating Makefile in modules...
        1 Datei(en) kopiert.
-
Now run mingw32-make to build the library.  But first, you should
 look at Makefile and change the installation locations if
 necessary.
-
---------------------------------X------------------------------------

That was just OK, but when I try to do the make, it fails. Before doing
this I edit the .\src\Makefile like the following:

prefix=/mingw/local #in this line
prefix=/mingw64/local #I made this change

Now I try the make:

---------------------------------X------------------------------------
C:\Sources\s-lang>mingw32-make
cd src && mingw32-make COPY="cmd /c copy /y" RM=del
prefix=C:/mingw/local
mingw32-make[1]: Entering directory `C:/Sources/s-lang/src'
gcc -c -DWIN32 -DSLANG_DLL=1 -O2 -W -Wall -o gw32objs/slang.o  ./slang.c
In file included from ./slang.c:30:0:
./slang.h:1403:1: error: unknown type name 'HANDLE'
 SL_EXTERN HANDLE SLw32_Hstdin;
 ^
./slang.c: In function 'execute_intrinsic_fun':
./slang.c:3621:14: warning: cast to pointer from integer of different
size
[-Win
t-to-pointer-cast]
  if (NULL == (char *)ret)
              ^
./slang.c:3623:33: warning: cast to pointer from integer of different
size
[-Win
t-to-pointer-cast]
  else (void) SLang_push_string ((char *)ret);
                                 ^
makefile:247: recipe for target `gw32objs/slang.o' failed
mingw32-make[1]: *** [gw32objs/slang.o] Error 1
mingw32-make[1]: Leaving directory `C:/Sources/s-lang/src'
makefile:15: recipe for target `all' failed
mingw32-make: *** [all] Error 2
---------------------------------X------------------------------------

The Compiler mingw64 don't know this "HANDLE" in line 1403 in the
.\src\slang.h. Also there is an error belonging to the slang.c.

With those errors there isn't generated a .\gw32objs\slang.o and so this
file ist missing for the following actions.

> I believe that the main problem is that slang/src/slconfig.h assumes
> 32 bits for windows.

I think too, thanks.
Because in the generated Makefile you can see:

 | # This Makefile is for the MINGW32 environment

> It will need to be modified.

This is logical.

> Is there a
> specific 64 bit preprocessor macro that gets defined when compiling in
> 64 bit mode?  If so, the modifications should include the use of such a
> variable.

I don't know.
But in the mingw64-manual there is described, that with the right
configuration automatically is choosed the 64-Bit variant of mingw64. In
its subdirectory there are both plattforms 32-bit and 64-bit.
I have configured for to use the 64-bit plattform for mingw64.
The commands are "mingw32" at all, used is just 64-bit.

Uwe


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j