unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* EXIT_SUCCESS and NO_RETURN in /lib-src
@ 2007-02-12  6:33 William Xue
  2007-02-12 20:46 ` Eli Zaretskii
  0 siblings, 1 reply; 15+ messages in thread
From: William Xue @ 2007-02-12  6:33 UTC (permalink / raw)
  To: emacs-devel

I build emacs-unicode-2 in winxp with MinGW, and it failed in /lib-src.

It says that the compile could not find the definition of EXIT_* and  
NO_RETURN in hexl.c and ebrowser.c and sorted-doc.c.

In hexl.c, I added
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif

in ebrowser.c, I added
#define NO_RETURN

and in sorted-doc.c, I added
#else
#include <stdlib.h>
#endif
in #ifndef HAVE_STDLIB_H

Maybe this is not the right way to build emacs under windows, but it  
works. This is not the first time that I encountered these errors.
I think that somebody should have a check about them.

Another error is about the movemail.c:
---8<------------------------------------------------------------------------------------->8---
gcc -I. -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0500 -D_X86_=1 -c   
-mno-cygwin -m
cpu=i686 -O2  -Di386 -D_CRTAPI1=_cdecl  -I./inc -DWINDOWSNT -DDOS_NT  
-DSTDC_HEAD
ERS=1 -DNO_LDAV=1 -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../nt/inc -I../src  
-DUSG -
o oo-spd/i386/movemail.o movemail.c
gcc -I. -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0500 -D_X86_=1 -c   
-mno-cygwin -m
cpu=i686 -O2  -Di386 -D_CRTAPI1=_cdecl  -I./inc -DWINDOWSNT -DDOS_NT  
-DSTDC_HEAD
ERS=1 -DNO_LDAV=1 -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../nt/inc -I../src  
-o oo-s
pd/i386/pop.o pop.c
gcc -o oo-spd/i386/movemail.exe   -mno-cygwin  oo-spd/i386/movemail.o  
oo-spd/i38
6/pop.o oo-spd/i386/ntlib.o oo-spd/i386/getopt.o oo-spd/i386/getopt1.o  
-lwsock32
    -ladvapi32
Info: resolving __sys_nerr by linking to __imp___sys_nerr (auto-import)
Info: resolving __sys_errlist by linking to __imp___sys_errlist  
(auto-import)
oo-spd/i386/movemail.o(.text+0x358):movemail.c: undefined reference to  
`link'
fu000001.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname'
fu000003.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname'
nmth000000.o(.idata$4+0x0): undefined reference to `_nm___sys_nerr'
nmth000002.o(.idata$4+0x0): undefined reference to `_nm___sys_errlist'
mingw32-make: *** [oo-spd/i386/movemail.exe] Error 1

I:\opensource\emacs\lib-src>
---8<------------------------------------------------------------------------------------->8---
I  have no idea about how to do with it.

-- 
Sincerely yours,
William

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

* Re: EXIT_SUCCESS and NO_RETURN in /lib-src
  2007-02-12  6:33 EXIT_SUCCESS and NO_RETURN in /lib-src William Xue
@ 2007-02-12 20:46 ` Eli Zaretskii
  2007-02-13  3:07   ` William Xue
  0 siblings, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2007-02-12 20:46 UTC (permalink / raw)
  To: William Xue; +Cc: emacs-devel

> Date: Mon, 12 Feb 2007 14:33:49 +0800
> From: "William Xue" <william.xue@gmail.com>
> 
> I build emacs-unicode-2 in winxp with MinGW, and it failed in /lib-src.
> 
> It says that the compile could not find the definition of EXIT_* and  
> NO_RETURN in hexl.c and ebrowser.c and sorted-doc.c.
> 
> In hexl.c, I added
> #ifdef HAVE_STDLIB_H
> #include <stdlib.h>
> #endif

Can you explain why this problem doesn't happen on HEAD?  AFAICS, the
MinGW build of Emacs pulls in stdlib.h from src/s/ms-w32.h, which is
included by config.h.  Can you see why this doesn't happen for you?

> in ebrowser.c, I added
> #define NO_RETURN

Shouldn't be needed, either: NO_RETURN is defined in config.h.

> and in sorted-doc.c, I added
> #else
> #include <stdlib.h>
> #endif
> in #ifndef HAVE_STDLIB_H

Same here.  It sounds like your compilation doesn't include config.h
for some reason, or maybe config.h is empty.  Please try to see why.

> Info: resolving __sys_nerr by linking to __imp___sys_nerr (auto-import)
> Info: resolving __sys_errlist by linking to __imp___sys_errlist  
> (auto-import)
> oo-spd/i386/movemail.o(.text+0x358):movemail.c: undefined reference to  
> `link'
> fu000001.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname'
> fu000003.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname'
> nmth000000.o(.idata$4+0x0): undefined reference to `_nm___sys_nerr'
> nmth000002.o(.idata$4+0x0): undefined reference to `_nm___sys_errlist'
> mingw32-make: *** [oo-spd/i386/movemail.exe] Error 1

Probably for the same reason: the Windows build is not supposed to
compile the code that uses the `link' function.

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

* Re: EXIT_SUCCESS and NO_RETURN in /lib-src
  2007-02-12 20:46 ` Eli Zaretskii
@ 2007-02-13  3:07   ` William Xue
  2007-02-13  4:25     ` Eli Zaretskii
  0 siblings, 1 reply; 15+ messages in thread
From: William Xue @ 2007-02-13  3:07 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

On Tue, 13 Feb 2007 04:46:02 +0800, Eli Zaretskii <eliz@gnu.org> wrote:

>> Date: Mon, 12 Feb 2007 14:33:49 +0800
>> From: "William Xue" <william.xue@gmail.com>
>>
>> I build emacs-unicode-2 in winxp with MinGW, and it failed in /lib-src.
>>
>> It says that the compile could not find the definition of EXIT_* and
>> NO_RETURN in hexl.c and ebrowser.c and sorted-doc.c.
>>
>> In hexl.c, I added
>> #ifdef HAVE_STDLIB_H
>> #include <stdlib.h>
>> #endif
>
> Can you explain why this problem doesn't happen on HEAD?  AFAICS, the
> MinGW build of Emacs pulls in stdlib.h from src/s/ms-w32.h, which is
> included by config.h.  Can you see why this doesn't happen for you?
>
>> in ebrowser.c, I added
>> #define NO_RETURN
>
> Shouldn't be needed, either: NO_RETURN is defined in config.h.

NO_RETURN is defined in config.h, like this:

474 #ifndef NO_RETURN
475 #if defined __GNUC__ && (__GNUC__ > 2 || (__GNUC__ == 2 &&  
__GNUC_MINOR >= 5))
476 #define NO_RETURN       __attribute__ ((__noreturn__))
477 #else
478 #define NO_RETURN       /* nothing */
479 #endif
480 #endif

maybe is skipped by line 475.

>
>> and in sorted-doc.c, I added
>> #else
>> #include <stdlib.h>
>> #endif
>> in #ifndef HAVE_STDLIB_H
>
> Same here.  It sounds like your compilation doesn't include config.h
> for some reason, or maybe config.h is empty.  Please try to see why.
>

IMHO, config.h was included. But could you teld how to confirm it?

>> Info: resolving __sys_nerr by linking to __imp___sys_nerr (auto-import)
>> Info: resolving __sys_errlist by linking to __imp___sys_errlist
>> (auto-import)
>> oo-spd/i386/movemail.o(.text+0x358):movemail.c: undefined reference to
>> `link'
>> fu000001.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname'
>> fu000003.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname'
>> nmth000000.o(.idata$4+0x0): undefined reference to `_nm___sys_nerr'
>> nmth000002.o(.idata$4+0x0): undefined reference to `_nm___sys_errlist'
>> mingw32-make: *** [oo-spd/i386/movemail.exe] Error 1
>
> Probably for the same reason: the Windows build is not supposed to
> compile the code that uses the `link' function.

I havn't known how to resolve this problem.

-- 
Sincerely yours,
William

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

* Re: EXIT_SUCCESS and NO_RETURN in /lib-src
  2007-02-13  3:07   ` William Xue
@ 2007-02-13  4:25     ` Eli Zaretskii
  2007-02-13  6:11       ` William Xue
  0 siblings, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2007-02-13  4:25 UTC (permalink / raw)
  To: William Xue; +Cc: emacs-devel

> Date: Tue, 13 Feb 2007 11:07:26 +0800
> From: "William Xue" <william.xue@gmail.com>
> Cc: emacs-devel@gnu.org
> >
> >> in ebrowser.c, I added
> >> #define NO_RETURN
> >
> > Shouldn't be needed, either: NO_RETURN is defined in config.h.
> 
> NO_RETURN is defined in config.h, like this:
> 
> 474 #ifndef NO_RETURN
> 475 #if defined __GNUC__ && (__GNUC__ > 2 || (__GNUC__ == 2 &&  
> __GNUC_MINOR >= 5))
> 476 #define NO_RETURN       __attribute__ ((__noreturn__))
> 477 #else
> 478 #define NO_RETURN       /* nothing */
> 479 #endif
> 480 #endif
> 
> maybe is skipped by line 475.

??? You did say you use MinGW, didn't you?  If so, your compiler is
GCC, which defines __GNUC__, and I cannot believe your GCC version is
less than 2.5.  What does "gcc --version" say?

> IMHO, config.h was included.  But could you teld how to confirm it?

Add to it an #error directive, and see if GCC emits the error
message.  Add that directive at the beginning, then at the end, and
see if the file is used in its entirety.

> >> Info: resolving __sys_nerr by linking to __imp___sys_nerr (auto-import)
> >> Info: resolving __sys_errlist by linking to __imp___sys_errlist
> >> (auto-import)
> >> oo-spd/i386/movemail.o(.text+0x358):movemail.c: undefined reference to
> >> `link'
> >> fu000001.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname'
> >> fu000003.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname'
> >> nmth000000.o(.idata$4+0x0): undefined reference to `_nm___sys_nerr'
> >> nmth000002.o(.idata$4+0x0): undefined reference to `_nm___sys_errlist'
> >> mingw32-make: *** [oo-spd/i386/movemail.exe] Error 1
> >
> > Probably for the same reason: the Windows build is not supposed to
> > compile the code that uses the `link' function.
> 
> I havn't known how to resolve this problem.

I think when you find and solve the other problems, this one will be
solved with them.

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

* Re: EXIT_SUCCESS and NO_RETURN in /lib-src
  2007-02-13  4:25     ` Eli Zaretskii
@ 2007-02-13  6:11       ` William Xue
  2007-02-13  9:09         ` Juanma Barranquero
  2007-02-14 14:53         ` Eli Zaretskii
  0 siblings, 2 replies; 15+ messages in thread
From: William Xue @ 2007-02-13  6:11 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

On Tue, 13 Feb 2007 12:25:15 +0800, Eli Zaretskii <eliz@gnu.org> wrote:

>> Date: Tue, 13 Feb 2007 11:07:26 +0800
>> From: "William Xue" <william.xue@gmail.com>
>> Cc: emacs-devel@gnu.org
>> >
>> >> in ebrowser.c, I added
>> >> #define NO_RETURN
>> >
>> > Shouldn't be needed, either: NO_RETURN is defined in config.h.
>>
>> NO_RETURN is defined in config.h, like this:
>>
>> 474 #ifndef NO_RETURN
>> 475 #if defined __GNUC__ && (__GNUC__ > 2 || (__GNUC__ == 2 &&
>> __GNUC_MINOR >= 5))
>> 476 #define NO_RETURN       __attribute__ ((__noreturn__))
>> 477 #else
>> 478 #define NO_RETURN       /* nothing */
>> 479 #endif
>> 480 #endif
>>
>> maybe is skipped by line 475.
>
> ??? You did say you use MinGW, didn't you?  If so, your compiler is
> GCC, which defines __GNUC__, and I cannot believe your GCC version is
> less than 2.5.  What does "gcc --version" say?

It is 3.2.3
---8<--------------------------------------------->8---
F:\MinGW\bin>gcc.exe --version
gcc.exe (GCC) 3.2.3 (mingw special 20030504-1)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
---8<--------------------------------------------->8---

I have found something in makefile:
---8<--------------------------------------------->8---
315 LOCAL_FLAGS     = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \
316                   -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../nt/inc \
317                   -I../src
---8<--------------------------------------------->8---
when run configure.bat in nt folder, I have specified '--cflags -I./inc'.
After I removed the -I../nt/inc in the makefile in lib-src folder, the  
build is OK.

It seems that only one -I flag allowed in this situation.
I specified the include path because I put all the graphic's header  
files(gif, bmp, jpg, tiff, etc) in there.

I did not know many about the flags in MinGW and GCC. Is there something  
wrong or it is the limitation of the compiler?

>
>> IMHO, config.h was included.  But could you teld how to confirm it?
>
> Add to it an #error directive, and see if GCC emits the error
> message.  Add that directive at the beginning, then at the end, and
> see if the file is used in its entirety.
>
>> >> Info: resolving __sys_nerr by linking to __imp___sys_nerr  
>> (auto-import)
>> >> Info: resolving __sys_errlist by linking to __imp___sys_errlist
>> >> (auto-import)
>> >> oo-spd/i386/movemail.o(.text+0x358):movemail.c: undefined reference  
>> to
>> >> `link'
>> >> fu000001.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname'
>> >> fu000003.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname'
>> >> nmth000000.o(.idata$4+0x0): undefined reference to `_nm___sys_nerr'
>> >> nmth000002.o(.idata$4+0x0): undefined reference to  
>> `_nm___sys_errlist'
>> >> mingw32-make: *** [oo-spd/i386/movemail.exe] Error 1
>> >
>> > Probably for the same reason: the Windows build is not supposed to
>> > compile the code that uses the `link' function.
>>
>> I havn't known how to resolve this problem.
>
> I think when you find and solve the other problems, this one will be
> solved with them.

if removed the -I../nt/inc from makefile,
'mingw32-make movemail' make the following errors:
---8<--------------------------------------------->8---
gcc -o oo-spd/i386/movemail.exe   -mno-cygwin  oo-spd/i386/movemail.o  
oo-spd/i38
6/pop.o oo-spd/i386/ntlib.o oo-spd/i386/getopt.o oo-spd/i386/getopt1.o  
-lwsock32
    -ladvapi32
oo-spd/i386/movemail.o(.text+0x86d):movemail.c: undefined reference to  
`pop_open
'
oo-spd/i386/movemail.o(.text+0x88d):movemail.c: undefined reference to  
`pop_stat
'
oo-spd/i386/movemail.o(.text+0x8a4):movemail.c: undefined reference to  
`pop_clos
e'
oo-spd/i386/movemail.o(.text+0x9c1):movemail.c: undefined reference to  
`pop_quit
'
oo-spd/i386/movemail.o(.text+0x9d9):movemail.c: undefined reference to  
`pop_erro
r'
oo-spd/i386/movemail.o(.text+0xa08):movemail.c: undefined reference to  
`pop_dele
te'
---8<--------------------------------------------->8---

if not remvove the flag, make the following errors:
---8<--------------------------------------------->8---
../src/process.h:81: parse error before "update_tick"
../src/process.h:83: parse error before "decode_coding_system"
../src/process.h:85: parse error before "decoding_buf"
../src/process.h:87: parse error before "decoding_carryover"
../src/process.h:89: parse error before "encode_coding_system"
../src/process.h:91: parse error before "encoding_buf"
../src/process.h:93: parse error before "encoding_carryover"
../src/process.h:96: parse error before "inherit_coding_system_flag"
../src/process.h:102: parse error before "filter_multibyte"
../src/process.h:105: parse error before "adaptive_read_buffering"
../src/process.h:112: parse error before "read_output_delay"
../src/process.h:114: parse error before "read_output_skip"
../src/process.h:126: parse error before ':' token
../src/process.h:128: parse error before '}' token
../src/process.h:136: parse error before "chan_process"
../src/process.h:139: parse error before "Vprocess_alist"
In file included from movemail.c:90:
ntlib.h:24:17: pwd.h: No such file or directory
movemail.c:690:17: pwd.h: No such file or directory
../src/process.h:136: warning: array `chan_process' assumed to have one  
element
mingw32-make: *** [oo-spd/i386/movemail.o] Error 1
---8<--------------------------------------------->8---

I'll still try these things.
-- 
Sincerely yours,
William

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

* Re: EXIT_SUCCESS and NO_RETURN in /lib-src
  2007-02-13  6:11       ` William Xue
@ 2007-02-13  9:09         ` Juanma Barranquero
  2007-02-13  9:15           ` William Xue
  2007-02-14  2:22           ` William Xue
  2007-02-14 14:53         ` Eli Zaretskii
  1 sibling, 2 replies; 15+ messages in thread
From: Juanma Barranquero @ 2007-02-13  9:09 UTC (permalink / raw)
  To: William Xue; +Cc: Eli Zaretskii, emacs-devel

On 2/13/07, William Xue <william.xue@gmail.com> wrote:

> It seems that only one -I flag allowed in this situation.
> I specified the include path because I put all the graphic's header
> files(gif, bmp, jpg, tiff, etc) in there.
>
> I did not know many about the flags in MinGW and GCC. Is there something
> wrong or it is the limitation of the compiler?

FWIW, I build the emacs-unicode-2 branch on Windows XP with MinGW (gcc
(GCC) 3.4.5 (mingw special) according to -v), passing -I to
configure.bat:

 cmd /c configure.bat --with-gcc --no-cygwin --cflags -IC:/emacs/build/include

and it works just fine.

             Juanma

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

* Re: EXIT_SUCCESS and NO_RETURN in /lib-src
  2007-02-13  9:09         ` Juanma Barranquero
@ 2007-02-13  9:15           ` William Xue
  2007-02-13  9:20             ` Juanma Barranquero
  2007-02-14  2:22           ` William Xue
  1 sibling, 1 reply; 15+ messages in thread
From: William Xue @ 2007-02-13  9:15 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Eli Zaretskii, emacs-devel

On Tue, 13 Feb 2007 17:09:03 +0800, Juanma Barranquero <lekktu@gmail.com>  
wrote:

> On 2/13/07, William Xue <william.xue@gmail.com> wrote:
>
>> It seems that only one -I flag allowed in this situation.
>> I specified the include path because I put all the graphic's header
>> files(gif, bmp, jpg, tiff, etc) in there.
>>
>> I did not know many about the flags in MinGW and GCC. Is there something
>> wrong or it is the limitation of the compiler?
>
> FWIW, I build the emacs-unicode-2 branch on Windows XP with MinGW (gcc
> (GCC) 3.4.5 (mingw special) according to -v), passing -I to
> configure.bat:
>
>  cmd /c configure.bat --with-gcc --no-cygwin --cflags  
> -IC:/emacs/build/include
>

Maybe it needs the absolute path?

> and it works just fine.
>
>              Juanma



-- 
Sincerely yours,
William

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

* Re: EXIT_SUCCESS and NO_RETURN in /lib-src
  2007-02-13  9:15           ` William Xue
@ 2007-02-13  9:20             ` Juanma Barranquero
  0 siblings, 0 replies; 15+ messages in thread
From: Juanma Barranquero @ 2007-02-13  9:20 UTC (permalink / raw)
  To: William Xue; +Cc: Eli Zaretskii, emacs-devel

On 2/13/07, William Xue <william.xue@gmail.com> wrote:

> Maybe it needs the absolute path?

It shouldn't, I think, but it's easy enough to try.

             Juanma

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

* Re: EXIT_SUCCESS and NO_RETURN in /lib-src
  2007-02-13  9:09         ` Juanma Barranquero
  2007-02-13  9:15           ` William Xue
@ 2007-02-14  2:22           ` William Xue
  2007-02-14  2:34             ` Juanma Barranquero
  2007-02-14 15:13             ` Eli Zaretskii
  1 sibling, 2 replies; 15+ messages in thread
From: William Xue @ 2007-02-14  2:22 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Eli Zaretskii, emacs-devel

On Tue, 13 Feb 2007 17:09:03 +0800, Juanma Barranquero <lekktu@gmail.com>  
wrote:

> On 2/13/07, William Xue <william.xue@gmail.com> wrote:
>
>> It seems that only one -I flag allowed in this situation.
>> I specified the include path because I put all the graphic's header
>> files(gif, bmp, jpg, tiff, etc) in there.
>>
>> I did not know many about the flags in MinGW and GCC. Is there something
>> wrong or it is the limitation of the compiler?
>
> FWIW, I build the emacs-unicode-2 branch on Windows XP with MinGW (gcc
> (GCC) 3.4.5 (mingw special) according to -v), passing -I to
> configure.bat:
>
>  cmd /c configure.bat --with-gcc --no-cygwin --cflags  
> -IC:/emacs/build/include
>
> and it works just fine.
>
>              Juanma

Finally, I find the reason of the issue. In my '../nt/inc' folder, there  
is another 'config.h' which is for 'libxpm', I think.
So, after I specified the '--cflags -I./inc' as a parameter of  
configure.bat, the errors is running.

IMHO, This is a potential bug, anyway, I should include that 'config.h' if  
I want to build emacs with graphics supported.

-- 
Sincerely yours,
William

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

* Re: EXIT_SUCCESS and NO_RETURN in /lib-src
  2007-02-14  2:22           ` William Xue
@ 2007-02-14  2:34             ` Juanma Barranquero
  2007-02-14  2:44               ` William Xue
  2007-02-14 15:13             ` Eli Zaretskii
  1 sibling, 1 reply; 15+ messages in thread
From: Juanma Barranquero @ 2007-02-14  2:34 UTC (permalink / raw)
  To: William Xue; +Cc: Eli Zaretskii, emacs-devel

On 2/14/07, William Xue <william.xue@gmail.com> wrote:

> Finally, I find the reason of the issue. In my '../nt/inc' folder, there
> is another 'config.h' which is for 'libxpm', I think.

[...]

> IMHO, This is a potential bug, anyway, I should include that 'config.h' if
> I want to build emacs with graphics supported.

I don't know what XPM library are you using. The one at GnuWin32 does
not have any config.h; you only need xpm4.dll in the path and
X11/xpm.h in your include dir.

             Juanma

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

* Re: EXIT_SUCCESS and NO_RETURN in /lib-src
  2007-02-14  2:34             ` Juanma Barranquero
@ 2007-02-14  2:44               ` William Xue
  2007-02-14  2:58                 ` Juanma Barranquero
  0 siblings, 1 reply; 15+ messages in thread
From: William Xue @ 2007-02-14  2:44 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Eli Zaretskii, emacs-devel

On Wed, 14 Feb 2007 10:34:57 +0800, Juanma Barranquero <lekktu@gmail.com>  
wrote:

> On 2/14/07, William Xue <william.xue@gmail.com> wrote:
>
>> Finally, I find the reason of the issue. In my '../nt/inc' folder, there
>> is another 'config.h' which is for 'libxpm', I think.
>
> [...]
>
>> IMHO, This is a potential bug, anyway, I should include that 'config.h'  
>> if
>> I want to build emacs with graphics supported.
>
> I don't know what XPM library are you using. The one at GnuWin32 does
> not have any config.h; you only need xpm4.dll in the path and
> X11/xpm.h in your include dir.
>
>              Juanma

Maybe you are right, I only simplely copied all the header files in libxpm  
in to that folder.
Not include a 'config.h' header file in a released lib, maybe this is the  
rule.

Thanks!

-- 
Sincerely yours,
William

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

* Re: EXIT_SUCCESS and NO_RETURN in /lib-src
  2007-02-14  2:44               ` William Xue
@ 2007-02-14  2:58                 ` Juanma Barranquero
  2007-02-15  1:52                   ` William Xue
  0 siblings, 1 reply; 15+ messages in thread
From: Juanma Barranquero @ 2007-02-14  2:58 UTC (permalink / raw)
  To: William Xue; +Cc: Eli Zaretskii, emacs-devel

On 2/14/07, William Xue <william.xue@gmail.com> wrote:

> Maybe you are right, I only simplely copied all the header files in libxpm
> in to that folder.

Well, if you drop into the compiler's include path all kinds of
unneeded files is no wonder that you accidentally find a conflict :)

I'm building Emacs on Windows with full image support (all image types
except Postscript, which is unsupported on Windows), and my include
dir contains just this:

gif_lib.h
jconfig.h
jerror.h
jmorecfg.h
jpeglib.h
png.h
pngconf.h
simx.h
tiff.h
tiffconf.h
tiffio.h
tiffvers.h
zconf.h
zlib.h
X11\xpm.h

             Juanma

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

* Re: EXIT_SUCCESS and NO_RETURN in /lib-src
  2007-02-13  6:11       ` William Xue
  2007-02-13  9:09         ` Juanma Barranquero
@ 2007-02-14 14:53         ` Eli Zaretskii
  1 sibling, 0 replies; 15+ messages in thread
From: Eli Zaretskii @ 2007-02-14 14:53 UTC (permalink / raw)
  To: William Xue; +Cc: emacs-devel

> Date: Tue, 13 Feb 2007 14:11:29 +0800
> From: "William Xue" <william.xue@gmail.com>
> Cc: emacs-devel@gnu.org
> 
> I have found something in makefile:
> ---8<--------------------------------------------->8---
> 315 LOCAL_FLAGS     = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \
> 316                   -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../nt/inc \
> 317                   -I../src
> ---8<--------------------------------------------->8---
> when run configure.bat in nt folder, I have specified '--cflags -I./inc'.
> After I removed the -I../nt/inc in the makefile in lib-src folder, the  
> build is OK.
> 
> It seems that only one -I flag allowed in this situation.
> I specified the include path because I put all the graphic's header  
> files(gif, bmp, jpg, tiff, etc) in there.
> 
> I did not know many about the flags in MinGW and GCC. Is there something  
> wrong or it is the limitation of the compiler?

As you have found out, the problem was an extra config.h in ../nt/inc.

In general, it is advisable to put the header files for the graphics
libraries in the same directory where the compiler header files are.

> if removed the -I../nt/inc from makefile,
> 'mingw32-make movemail' make the following errors:
> ---8<--------------------------------------------->8---
> gcc -o oo-spd/i386/movemail.exe   -mno-cygwin  oo-spd/i386/movemail.o  
> oo-spd/i386/pop.o oo-spd/i386/ntlib.o oo-spd/i386/getopt.o oo-spd/i386/getopt1.o  -lwsock32  -ladvapi32 oo-spd/i386/movemail.o(.text+0x86d):movemail.c: undefined reference to  `pop_open'

I think you need to remove all .o files, and then run configure,bat
and try building again.

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

* Re: EXIT_SUCCESS and NO_RETURN in /lib-src
  2007-02-14  2:22           ` William Xue
  2007-02-14  2:34             ` Juanma Barranquero
@ 2007-02-14 15:13             ` Eli Zaretskii
  1 sibling, 0 replies; 15+ messages in thread
From: Eli Zaretskii @ 2007-02-14 15:13 UTC (permalink / raw)
  To: William Xue; +Cc: lekktu, emacs-devel

> Date: Wed, 14 Feb 2007 10:22:25 +0800
> From: "William Xue" <william.xue@gmail.com>
> Cc: "Eli Zaretskii" <eliz@gnu.org>, emacs-devel@gnu.org
> 
> IMHO, This is a potential bug, anyway, I should include that 'config.h' if  
> I want to build emacs with graphics supported.

No, you don't need any config.h for XPM, you need only xpm.h and
simx.h.

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

* Re: EXIT_SUCCESS and NO_RETURN in /lib-src
  2007-02-14  2:58                 ` Juanma Barranquero
@ 2007-02-15  1:52                   ` William Xue
  0 siblings, 0 replies; 15+ messages in thread
From: William Xue @ 2007-02-15  1:52 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Eli Zaretskii, emacs-devel

On Wed, 14 Feb 2007 10:58:24 +0800, Juanma Barranquero <lekktu@gmail.com>  
wrote:

> On 2/14/07, William Xue <william.xue@gmail.com> wrote:
>
>> Maybe you are right, I only simplely copied all the header files in  
>> libxpm
>> in to that folder.
>
> Well, if you drop into the compiler's include path all kinds of
> unneeded files is no wonder that you accidentally find a conflict :)
>
> I'm building Emacs on Windows with full image support (all image types
> except Postscript, which is unsupported on Windows), and my include
> dir contains just this:
>
> gif_lib.h
> jconfig.h
> jerror.h
> jmorecfg.h
> jpeglib.h
> png.h
> pngconf.h
> simx.h
> tiff.h
> tiffconf.h
> tiffio.h
> tiffvers.h
> zconf.h
> zlib.h
> X11\xpm.h
>
>              Juanma

Got it.

Thank you, Juanma and Eli.

-- 
Sincerely yours,
William

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

end of thread, other threads:[~2007-02-15  1:52 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-12  6:33 EXIT_SUCCESS and NO_RETURN in /lib-src William Xue
2007-02-12 20:46 ` Eli Zaretskii
2007-02-13  3:07   ` William Xue
2007-02-13  4:25     ` Eli Zaretskii
2007-02-13  6:11       ` William Xue
2007-02-13  9:09         ` Juanma Barranquero
2007-02-13  9:15           ` William Xue
2007-02-13  9:20             ` Juanma Barranquero
2007-02-14  2:22           ` William Xue
2007-02-14  2:34             ` Juanma Barranquero
2007-02-14  2:44               ` William Xue
2007-02-14  2:58                 ` Juanma Barranquero
2007-02-15  1:52                   ` William Xue
2007-02-14 15:13             ` Eli Zaretskii
2007-02-14 14:53         ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).