Forum: Ruby-core [ruby-trunk - Bug #6633][Assigned] MinGW: broken build caused by changes in process.c (execve)

Posted by Luis Lavena (luislavena)
on 2012-06-23 15:47
(Received via mailing list)
Issue #6633 has been reported by luislavena (Luis Lavena).

----------------------------------------
Bug #6633: MinGW: broken build caused by changes in process.c (execve)
https://bugs.ruby-lang.org/issues/6633

Author: luislavena (Luis Lavena)
Status: Assigned
Priority: High
Assignee: akr (Akira Tanaka)
Category: build
Target version: 2.0.0
ruby -v: trunk r36201


=begin
Hello,

I find myself unable to compile trunk (r36201) caused by errors in 
process.c (execve):

 compiling ../process.c
 ../process.c: In function 'proc_exec_cmd':
 ../process.c:1138:9: warning: passing argument 2 of 'execve' from 
incompatible pointer type [enabled by default]
 c:\users\worker\tools\devkit\tdm-32-4.6.1\mingw\bin\../lib/gcc/mingw32/4.6.1/../../../../include/process.h:119:42: 
note:
 expected 'const char * const*' but argument is of type 'char **'
 ../process.c:1138:9: warning: passing argument 3 of 'execve' from 
incompatible pointer type [enabled by default]
 c:\users\worker\tools\devkit\tdm-32-4.6.1\mingw\bin\../lib/gcc/mingw32/4.6.1/../../../../include/process.h:119:42: 
note:
 expected 'const char * const*' but argument is of type 'char **'
 ../process.c: In function 'rb_execarg_addopt':
 ../process.c:1582:18: error: 'options' undeclared (first use in this 
function)
 ../process.c:1582:18: note: each undeclared identifier is reported only 
once for each function it appears in
 ../process.c: In function 'save_env':
 ../process.c:2711:11: warning: variable 'soptions' set but not used 
[-Wunused-but-set-variable]
 ../process.c: In function 'p_uid_change_privilege':
 ../process.c:4895:14: warning: variable 'uid' set but not used 
[-Wunused-but-set-variable]
 ../process.c: In function 'p_gid_change_privilege':
 ../process.c:5598:14: warning: variable 'gid' set but not used 
[-Wunused-but-set-variable]
 make: *** [process.o] Error 1

Above error happens under GCC 4.5.2, 4.6.1 and 4.6.3 in both x86 and x64 
(mingw and mingw-w64 respectively)

Base Ruby is 1.9.3-p194 [i386-mingw32]

=end
Posted by Tanaka Akira (Guest)
on 2012-06-23 16:23
(Received via mailing list)
2012/6/23 luislavena (Luis Lavena) <luislavena@gmail.com>:
>
> Issue #6633 has been reported by luislavena (Luis Lavena).

>  ../process.c: In function 'rb_execarg_addopt':
>  ../process.c:1582:18: error: 'options' undeclared (first use in this function)
>  ../process.c:1582:18: note: each undeclared identifier is reported only once 
for each function it appears in
>  ../process.c: In function 'save_env':
>  ../process.c:2711:11: warning: variable 'soptions' set but not used 
[-Wunused-but-set-variable]
>  ../process.c: In function 'p_uid_change_privilege':
>  ../process.c:4895:14: warning: variable 'uid' set but not used 
[-Wunused-but-set-variable]
>  ../process.c: In function 'p_gid_change_privilege':
>  ../process.c:5598:14: warning: variable 'gid' set but not used 
[-Wunused-but-set-variable]
>  make: *** [process.o] Error 1

Oops.  I hope r36202 fix the problem.
Posted by Luis Lavena (luislavena)
on 2012-06-23 16:44
(Received via mailing list)
Issue #6633 has been updated by luislavena (Luis Lavena).

Status changed from Assigned to Closed
% Done changed from 0 to 100

=begin
akr (Akira Tanaka) wrote:
>
>  Oops.  I hope r36202 fix the problem.

Yes, it does, thank you.

I'm still seeing a bunch of warnings:

 compiling ../process.c
 ../process.c: In function 'proc_exec_cmd':
 ../process.c:1138:9: warning: passing argument 2 of 'execve' from 
incompatible pointer type [enabled by default]
 c:\users\worker\tools\devkit\tdm-32-4.6.1\mingw\bin\../lib/gcc/mingw32/4.6.1/../../../../include/process.h:119:42: 
note:
 expected 'const char * const*' but argument is of type 'char **'
 ../process.c:1138:9: warning: passing argument 3 of 'execve' from 
incompatible pointer type [enabled by default]
 c:\users\worker\tools\devkit\tdm-32-4.6.1\mingw\bin\../lib/gcc/mingw32/4.6.1/../../../../include/process.h:119:42: 
note:
 expected 'const char * const*' but argument is of type 'char **'
 ../process.c: In function 'proc_spawn_cmd':
 ../process.c:1346:11: warning: unused variable 'options' 
[-Wunused-variable]
 ../process.c: In function 'save_env':
 ../process.c:2708:11: warning: variable 'soptions' set but not used 
[-Wunused-but-set-variable]
 ../process.c: In function 'p_uid_change_privilege':
 ../process.c:4892:14: warning: variable 'uid' set but not used 
[-Wunused-but-set-variable]
 ../process.c: In function 'p_gid_change_privilege':
 ../process.c:5595:14: warning: variable 'gid' set but not used 
[-Wunused-but-set-variable]

Closing this out as build has been fixed.

Thank you again.
=end
----------------------------------------
Bug #6633: MinGW: broken build caused by changes in process.c (execve)
https://bugs.ruby-lang.org/issues/6633#change-27377

Author: luislavena (Luis Lavena)
Status: Closed
Priority: High
Assignee: akr (Akira Tanaka)
Category: build
Target version: 2.0.0
ruby -v: trunk r36201


=begin
Hello,

I find myself unable to compile trunk (r36201) caused by errors in 
process.c (execve):

 compiling ../process.c
 ../process.c: In function 'proc_exec_cmd':
 ../process.c:1138:9: warning: passing argument 2 of 'execve' from 
incompatible pointer type [enabled by default]
 c:\users\worker\tools\devkit\tdm-32-4.6.1\mingw\bin\../lib/gcc/mingw32/4.6.1/../../../../include/process.h:119:42: 
note:
 expected 'const char * const*' but argument is of type 'char **'
 ../process.c:1138:9: warning: passing argument 3 of 'execve' from 
incompatible pointer type [enabled by default]
 c:\users\worker\tools\devkit\tdm-32-4.6.1\mingw\bin\../lib/gcc/mingw32/4.6.1/../../../../include/process.h:119:42: 
note:
 expected 'const char * const*' but argument is of type 'char **'
 ../process.c: In function 'rb_execarg_addopt':
 ../process.c:1582:18: error: 'options' undeclared (first use in this 
function)
 ../process.c:1582:18: note: each undeclared identifier is reported only 
once for each function it appears in
 ../process.c: In function 'save_env':
 ../process.c:2711:11: warning: variable 'soptions' set but not used 
[-Wunused-but-set-variable]
 ../process.c: In function 'p_uid_change_privilege':
 ../process.c:4895:14: warning: variable 'uid' set but not used 
[-Wunused-but-set-variable]
 ../process.c: In function 'p_gid_change_privilege':
 ../process.c:5598:14: warning: variable 'gid' set but not used 
[-Wunused-but-set-variable]
 make: *** [process.o] Error 1

Above error happens under GCC 4.5.2, 4.6.1 and 4.6.3 in both x86 and x64 
(mingw and mingw-w64 respectively)

Base Ruby is 1.9.3-p194 [i386-mingw32]

=end
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.