all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Bootstrap failed during compile of process.c
@ 2006-01-04  6:58 Lennart Borgman
  2006-01-04  9:05 ` Kim F. Storm
  0 siblings, 1 reply; 13+ messages in thread
From: Lennart Borgman @ 2006-01-04  6:58 UTC (permalink / raw)


Bootstrap failed with latest CVS on w32:

gcc -I. -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0400 -D_X86_=1 -c   
-mtune=pentium4 -O2  -Di386 -D_CRTAPI1=_cdecl  -Id:/g/include -Demacs=1 
-DWINDOWSNT -DDOS_NT -DHAVE_CONFIG_H -I../nt/inc -D_UCHAR_T 
-DHAVE_NTGUI=1 -DUSE_CRT_DLL=1 -DPURESIZE=5000000 -o 
oo-spd/i386/process.o process.c

process.c: In function `conv_sockaddr_to_lisp':

process.c:2234: error: dereferencing pointer to incomplete type

process.c:2235: error: dereferencing pointer to incomplete type

process.c:2238: error: dereferencing pointer to incomplete type

process.c: In function `get_lisp_to_sockaddr_size':

process.c:2292: error: invalid application of `sizeof' to incomplete 
type `sockaddr_in6'

process.c: In function `conv_lisp_to_sockaddr':

process.c:2345: error: dereferencing pointer to incomplete type

process.c:2346: error: dereferencing pointer to incomplete type

process.c:2348: error: dereferencing pointer to incomplete type

process.c: In function `server_accept_connection':

process.c:3901: error: field `in6' has incomplete type

make[2]: *** [oo-spd/i386/process.o] Error 1

make[2]: Leaving directory `D:/ecvs/bld/emacs/src'

make[1]: *** [bootstrap-temacs] Error 2

make[1]: Leaving directory `D:/ecvs/bld/emacs/src'

make: *** [bootstrap-gmake] Error 2

bootstrap-060104.tmp

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Bootstrap failed during compile of process.c
  2006-01-04  6:58 Bootstrap failed during compile of process.c Lennart Borgman
@ 2006-01-04  9:05 ` Kim F. Storm
  2006-01-04 14:31   ` Lennart Borgman
  0 siblings, 1 reply; 13+ messages in thread
From: Kim F. Storm @ 2006-01-04  9:05 UTC (permalink / raw)
  Cc: Emacs Devel

Lennart Borgman <lennart.borgman.073@student.lu.se> writes:

> Bootstrap failed with latest CVS on w32:

It looks like w32 defines AF_INET6, but not struct sockaddr_in6.

Maybe it needs some additional header file to compile.

I don't have a w32 environment here -- can you try to find
the proper header file.  Thanks.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Bootstrap failed during compile of process.c
  2006-01-04  9:05 ` Kim F. Storm
@ 2006-01-04 14:31   ` Lennart Borgman
  2006-01-04 15:49     ` Kim F. Storm
  2006-01-04 17:56     ` Eli Zaretskii
  0 siblings, 2 replies; 13+ messages in thread
From: Lennart Borgman @ 2006-01-04 14:31 UTC (permalink / raw)
  Cc: Emacs Devel

Kim F. Storm wrote:

>Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
>
>  
>
>>Bootstrap failed with latest CVS on w32:
>>    
>>
>
>It looks like w32 defines AF_INET6, but not struct sockaddr_in6.
>
>Maybe it needs some additional header file to compile.
>
>I don't have a w32 environment here -- can you try to find
>the proper header file.  Thanks.
>  
>
I no very little about network programming. I searched a bit in the 
files and here is what I found:

I looked in the header files for MinGW5 and sockaddr_in6 is found in 
ws2tcpip.h. This is consistent with

   
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/sockaddr_2.asp

Where should ws2tcpip.h be included? Or should it currently?

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Bootstrap failed during compile of process.c
  2006-01-04 14:31   ` Lennart Borgman
@ 2006-01-04 15:49     ` Kim F. Storm
  2006-01-04 17:51       ` Lennart Borgman
  2006-01-04 17:59       ` Eli Zaretskii
  2006-01-04 17:56     ` Eli Zaretskii
  1 sibling, 2 replies; 13+ messages in thread
From: Kim F. Storm @ 2006-01-04 15:49 UTC (permalink / raw)
  Cc: Emacs Devel

Lennart Borgman <lennart.borgman.073@student.lu.se> writes:

> I looked in the header files for MinGW5 and sockaddr_in6 is found in
> ws2tcpip.h. This is consistent with
>
>    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/sockaddr_2.asp
>
> Where should ws2tcpip.h be included? Or should it currently?

Does this fix it?

*** process.c	04 Jan 2006 01:06:39 +0100	1.469
--- process.c	04 Jan 2006 16:49:14 +0100	
***************
*** 108,113 ****
--- 108,117 ----
  #endif
  #include <net/if.h>
  #endif
+ 
+ #if defined(WINDOWSNT) && defined(AF_INET6)
+ #include <ws2tcpip.h>
+ #endif
  #endif
  
  #ifdef IRIS

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Bootstrap failed during compile of process.c
  2006-01-04 15:49     ` Kim F. Storm
@ 2006-01-04 17:51       ` Lennart Borgman
  2006-01-04 17:59       ` Eli Zaretskii
  1 sibling, 0 replies; 13+ messages in thread
From: Lennart Borgman @ 2006-01-04 17:51 UTC (permalink / raw)
  Cc: Emacs Devel

Kim F. Storm wrote:

>Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
>
>  
>
>>I looked in the header files for MinGW5 and sockaddr_in6 is found in
>>ws2tcpip.h. This is consistent with
>>
>>   http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/sockaddr_2.asp
>>
>>Where should ws2tcpip.h be included? Or should it currently?
>>    
>>
>
>Does this fix it?
>
>*** process.c	04 Jan 2006 01:06:39 +0100	1.469
>--- process.c	04 Jan 2006 16:49:14 +0100	
>***************
>*** 108,113 ****
>--- 108,117 ----
>  #endif
>  #include <net/if.h>
>  #endif
>+ 
>+ #if defined(WINDOWSNT) && defined(AF_INET6)
>+ #include <ws2tcpip.h>
>+ #endif
>  #endif
>  
>  #ifdef IRIS
>  
>
I had to make the changes below too to make it compile. It compiles, I 
can start it - but I have no idea if this is correct.

-- Lennart


Index: nt/inc/sys/socket.h
===================================================================
RCS file: /cvsroot/emacs/emacs/nt/inc/sys/socket.h,v
retrieving revision 1.11
diff -c -r1.11 socket.h
*** nt/inc/sys/socket.h    10 Aug 2005 15:40:54 -0000    1.11
--- nt/inc/sys/socket.h    4 Jan 2006 16:29:14 -0000
***************
*** 50,56 ****
  #define timeval ws_timeval
  #endif
 
! #include <winsock.h>
 
  /* redefine select to reference our version */
  #ifdef MUST_REDEF_SELECT
--- 50,56 ----
  #define timeval ws_timeval
  #endif
 
! #include <winsock2.h>
 
  /* redefine select to reference our version */
  #ifdef MUST_REDEF_SELECT

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Bootstrap failed during compile of process.c
  2006-01-04 14:31   ` Lennart Borgman
  2006-01-04 15:49     ` Kim F. Storm
@ 2006-01-04 17:56     ` Eli Zaretskii
  2006-01-04 18:22       ` Lennart Borgman
  2006-01-04 18:43       ` Lennart Borgman
  1 sibling, 2 replies; 13+ messages in thread
From: Eli Zaretskii @ 2006-01-04 17:56 UTC (permalink / raw)
  Cc: emacs-devel, storm

> Date: Wed, 04 Jan 2006 15:31:44 +0100
> From: Lennart Borgman <lennart.borgman.073@student.lu.se>
> Cc: Emacs Devel <emacs-devel@gnu.org>
> 
> I no very little about network programming. I searched a bit in the 
> files and here is what I found:
> 
> I looked in the header files for MinGW5 and sockaddr_in6 is found in 
> ws2tcpip.h. This is consistent with
> 
>    
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/sockaddr_2.asp
> 
> Where should ws2tcpip.h be included? Or should it currently?

I don't know, and I have no time to look into the intricacies of using
winsock in the w32 port (in particular, src/s/ms-w32.h makes a point
of forcing windows.h not to include winsock.h, for some undisclosed
reason, and the build uses winsock.h, which is incompatible with
ws2tcpip.h, instead of winsock2.h).

So I simply disabled IPv6 support for the w32 build, for now.  (FWIW,
I think it was a mistake to introduce it so close to a release for
other platforms as well, but that's history now.)

Please resync with CVS and try building again.  It should build now.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Bootstrap failed during compile of process.c
  2006-01-04 15:49     ` Kim F. Storm
  2006-01-04 17:51       ` Lennart Borgman
@ 2006-01-04 17:59       ` Eli Zaretskii
  1 sibling, 0 replies; 13+ messages in thread
From: Eli Zaretskii @ 2006-01-04 17:59 UTC (permalink / raw)
  Cc: lennart.borgman.073, emacs-devel

> From: storm@cua.dk (Kim F. Storm)
> Date: Wed, 04 Jan 2006 16:49:44 +0100
> Cc: Emacs Devel <emacs-devel@gnu.org>
> 
> Does this fix it?
> 
> *** process.c	04 Jan 2006 01:06:39 +0100	1.469
> --- process.c	04 Jan 2006 16:49:14 +0100	
> ***************
> *** 108,113 ****
> --- 108,117 ----
>   #endif
>   #include <net/if.h>
>   #endif
> + 
> + #if defined(WINDOWSNT) && defined(AF_INET6)
> + #include <ws2tcpip.h>
> + #endif
>   #endif

I don't think this is a good idea, since ws2tcpip.h is incompatible
with winsock.h (which is included earlier in process.c by sys/socket.h
emulation in nt/inc/sys/socket.h).  Here's the relevant excerpt from
ws2tcpip.h on my system:

    #if (defined _WINSOCK_H && !defined _WINSOCK2_H)
    #error "ws2tcpip.h is not compatable with winsock.h. Include winsock2.h instead."
    #endif

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Bootstrap failed during compile of process.c
  2006-01-04 17:56     ` Eli Zaretskii
@ 2006-01-04 18:22       ` Lennart Borgman
  2006-01-04 18:27         ` Eli Zaretskii
  2006-01-04 18:43       ` Lennart Borgman
  1 sibling, 1 reply; 13+ messages in thread
From: Lennart Borgman @ 2006-01-04 18:22 UTC (permalink / raw)
  Cc: emacs-devel, storm

Eli Zaretskii wrote:

>>Date: Wed, 04 Jan 2006 15:31:44 +0100
>>From: Lennart Borgman <lennart.borgman.073@student.lu.se>
>>Cc: Emacs Devel <emacs-devel@gnu.org>
>>
>>I no very little about network programming. I searched a bit in the 
>>files and here is what I found:
>>
>>I looked in the header files for MinGW5 and sockaddr_in6 is found in 
>>ws2tcpip.h. This is consistent with
>>
>>   
>>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/sockaddr_2.asp
>>
>>Where should ws2tcpip.h be included? Or should it currently?
>>    
>>
>
>I don't know, and I have no time to look into the intricacies of using
>winsock in the w32 port (in particular, src/s/ms-w32.h makes a point
>of forcing windows.h not to include winsock.h, for some undisclosed
>reason, and the build uses winsock.h, which is incompatible with
>ws2tcpip.h, instead of winsock2.h).
>  
>
I saw some pages saying that winsock2.h must be included before 
windows.h. Maybe that is the reason?

>So I simply disabled IPv6 support for the w32 build, for now.  (FWIW,
>I think it was a mistake to introduce it so close to a release for
>other platforms as well, but that's history now.)
>
Ok, thanks.

This however reminds me of the problem with emacsserver/client that does 
not work yet on w32. In gnuserver/client (which works) windows2.h is 
used. Is there maybe some compatibility reason to use windows2.h?

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Bootstrap failed during compile of process.c
  2006-01-04 18:22       ` Lennart Borgman
@ 2006-01-04 18:27         ` Eli Zaretskii
  2006-01-04 18:50           ` Lennart Borgman
  0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2006-01-04 18:27 UTC (permalink / raw)
  Cc: emacs-devel, storm

> Date: Wed, 04 Jan 2006 19:22:06 +0100
> From: Lennart Borgman <lennart.borgman.073@student.lu.se>
> CC: storm@cua.dk,  emacs-devel@gnu.org
> 
> I saw some pages saying that winsock2.h must be included before 
> windows.h. Maybe that is the reason?

Maybe, I don't know.  I will have to study the differences between
winsock.h and winsock2.h, and that will have to wait until I have
enough time, unless someone more knowledgeable beats me to it.

In any case, it's not for this release (there are much safer changes
than this that I'm holding until after the release, like using DWARF-2
debug info in compilation commands).

> This however reminds me of the problem with emacsserver/client that does 
> not work yet on w32. In gnuserver/client (which works) windows2.h is 
> used. Is there maybe some compatibility reason to use windows2.h?

Where can I find the up-to-date sources of gnuserver/client?  Looking
there might help me understand the issue better (or sooner ;-).

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Bootstrap failed during compile of process.c
  2006-01-04 17:56     ` Eli Zaretskii
  2006-01-04 18:22       ` Lennart Borgman
@ 2006-01-04 18:43       ` Lennart Borgman
  2006-01-05 16:02         ` Stefan Monnier
  1 sibling, 1 reply; 13+ messages in thread
From: Lennart Borgman @ 2006-01-04 18:43 UTC (permalink / raw)
  Cc: emacs-devel, storm

Eli Zaretskii wrote:

>I don't know, and I have no time to look into the intricacies of using
>winsock in the w32 port (in particular, src/s/ms-w32.h makes a point
>of forcing windows.h not to include winsock.h, for some undisclosed
>reason, and the build uses winsock.h, which is incompatible with
>ws2tcpip.h, instead of winsock2.h).
>
>So I simply disabled IPv6 support for the w32 build, for now.  (FWIW,
>I think it was a mistake to introduce it so close to a release for
>other platforms as well, but that's history now.)
>
>Please resync with CVS and try building again.  It should build now.
>  
>
I wonder if the changes above have something to do with that 
emacsserver/client still does not work on w32? I do not know much about 
it but somewhere in my head is something about compatibility and winsock2.h.

I guess Juanma has not had time to look into emacsserver/client now and 
no one else has either as far as I know. Actually when I tested now 
again to run server-start I saw that things are worse now than before on 
w32. There are at least two new non crossplatform changes (if I 
understand this correctly):

    (defvar server-socket-dir
     (format "/tmp/emacs%d" (user-uid)))

Should not this use `temporary-file-directory'?

Then in

    (defun server-ensure-safe-dir (dir)
      "Make sure DIR is a directory with no race-condition issues.
    Creates the directory if necessary and makes sure:
    - there's no symlink involved
    - it's owned by us
    - it's not readable/writable by anybody else."
      (setq dir (directory-file-name dir))
      (let ((attrs (file-attributes dir)))
        (unless attrs
          (letf (((default-file-modes) ?\700)) (make-directory dir))
          (setq attrs (file-attributes dir)))
        ;; Check that it's safe for use.
        (unless (and (eq t (car attrs)) (eq (nth 2 attrs) (user-uid))
             (zerop (logand ?\077 (file-modes dir))))
          (error "The directory %s is unsafe" dir))))

there are several tests that are not cross platforms.

Why does this happen? It would be very good if new code where cross 
platform. (On the elisp level I guess that care must be taken for all 
operations handling files. Is there anything else? Maybe networking?)

I welcome more cross platform knowledge. It is in my opinion very 
important that we have knowledge from different platforms to keep things 
together. Currently it would IMO be very good if someone with knowledge 
in network programming on w32 and other platforms could help solve the 
problem with emacsserver/client on w32!

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Bootstrap failed during compile of process.c
  2006-01-04 18:27         ` Eli Zaretskii
@ 2006-01-04 18:50           ` Lennart Borgman
  2006-01-04 19:59             ` Lennart Borgman
  0 siblings, 1 reply; 13+ messages in thread
From: Lennart Borgman @ 2006-01-04 18:50 UTC (permalink / raw)
  Cc: emacs-devel, storm

Eli Zaretskii wrote:

>In any case, it's not for this release (there are much safer changes
>than this that I'm holding until after the release, like using DWARF-2
>debug info in compilation commands).
>  
>
I am not sure. Maybe winsock2 could help solve the problem with 
emacsserver/client?

>  
>
>>This however reminds me of the problem with emacsserver/client that does 
>>not work yet on w32. In gnuserver/client (which works) windows2.h is 
>>used. Is there maybe some compatibility reason to use windows2.h?
>>    
>>
>
>Where can I find the up-to-date sources of gnuserver/client?  Looking
>there might help me understand the issue better (or sooner ;-).
>  
>
You can find it in EmacsW32: 
http://ourcomments.org/Emacs/DL/EmacsW32%20only/

or at Guys site: http://www.wyrdrune.com/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Bootstrap failed during compile of process.c
  2006-01-04 18:50           ` Lennart Borgman
@ 2006-01-04 19:59             ` Lennart Borgman
  0 siblings, 0 replies; 13+ messages in thread
From: Lennart Borgman @ 2006-01-04 19:59 UTC (permalink / raw)
  Cc: Eli Zaretskii, storm

Lennart Borgman wrote:

> Eli Zaretskii wrote:
>
>> In any case, it's not for this release (there are much safer changes
>> than this that I'm holding until after the release, like using DWARF-2
>> debug info in compilation commands).
>>  
>>
> I am not sure. Maybe winsock2 could help solve the problem with 
> emacsserver/client?

I just tried with the changes I told before to start emacsserver with 
start-server. It still takes 100% CPU.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Bootstrap failed during compile of process.c
  2006-01-04 18:43       ` Lennart Borgman
@ 2006-01-05 16:02         ` Stefan Monnier
  0 siblings, 0 replies; 13+ messages in thread
From: Stefan Monnier @ 2006-01-05 16:02 UTC (permalink / raw)
  Cc: Eli Zaretskii, storm, emacs-devel

>     (defvar server-socket-dir
>      (format "/tmp/emacs%d" (user-uid)))

> Should not this use `temporary-file-directory'?

emacsclient.c needs to use the exact same name without having to
read&parse your .emacs.  So yes it would be good, but no I don't think it
can be done realistically.

> Why does this happen? It would be very good if new code where cross
> platform. (On the elisp level I guess that care must be taken for all
> operations handling files. Is there anything else? Maybe networking?)

The reason why I wrote it this way is because I don't know better.
Hopefully file-modes returns the same kind of values on Unix and w32 so the
above code may look Unixy but will work under w32 nonetheless.


        Stefan

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2006-01-05 16:02 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-04  6:58 Bootstrap failed during compile of process.c Lennart Borgman
2006-01-04  9:05 ` Kim F. Storm
2006-01-04 14:31   ` Lennart Borgman
2006-01-04 15:49     ` Kim F. Storm
2006-01-04 17:51       ` Lennart Borgman
2006-01-04 17:59       ` Eli Zaretskii
2006-01-04 17:56     ` Eli Zaretskii
2006-01-04 18:22       ` Lennart Borgman
2006-01-04 18:27         ` Eli Zaretskii
2006-01-04 18:50           ` Lennart Borgman
2006-01-04 19:59             ` Lennart Borgman
2006-01-04 18:43       ` Lennart Borgman
2006-01-05 16:02         ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.