Opened 9 years ago

Last modified 7 years ago

#124 new defect

Build problems on OS/2 with GCC 4

Reported by: dmik Owned by:
Priority: major Milestone: 0.1.5
Component: kBuild Version: 0.1.5
Keywords: Cc:

Description

An attempt to build r2786 on OS/2 brings several problems. One is:

kBuild: Linking wrapper
gcc.exe: error: unrecognized command line option '-Zstack=1024'

Another one is:

kBuild: Compiling kmk - D:/Coding/kbuild/trunk/src/kmk/kmkbuiltin/mv.c
D:/Coding/kbuild/trunk/src/kmk/kmkbuiltin/mv.c:113:13: error: static declaration of 'user_from_uid' follows non-static declaration
 const char *user_from_uid(uid_t id, int x)
             ^
In file included from D:/Coding/kbuild/trunk/src/kmk/kmkbuiltin/mv.c:70:0:
C:/usr/include/pwd.h:180:13: note: previous declaration of 'user_from_uid' was here
 const char *user_from_uid(uid_t, int);
             ^
D:/Coding/kbuild/trunk/src/kmk/kmkbuiltin/mv.c:123:13: error: static declaration of 'group_from_gid' follows non-static declaration
 const char *group_from_gid(gid_t id, int x)
             ^
In file included from D:/Coding/kbuild/trunk/src/kmk/kmkbuiltin/mv.c:67:0:
C:/usr/include/grp.h:83:13: note: previous declaration of 'group_from_gid' was here
 const char *group_from_gid(gid_t, int);
             ^
kmk: *** [D:/Coding/kbuild/trunk/out/os2.x86/release/obj/kmk/kmkbuiltin/mv.o] Error 1

Attachments (1)

kbuild-008-gcc4.patch (1.6 KB ) - added by dmik 9 years ago.

Download all attachments as: .zip

Change History (3)

by dmik, 9 years ago

Attachment: kbuild-008-gcc4.patch added

comment:1 by dmik, 9 years ago

The above patch fixes both problems. There are also a couple of warnings which I ignored and didn't fix, JFYI:

kBuild: Compiling kmk - D:/Users/dmik/rpmbuild/BUILD/kbuild-0.1.9998.7/src/kmk/file.c
D:/Users/dmik/rpmbuild/BUILD/kbuild-0.1.9998.7/src/kmk/dir.c: In function 'dir_contents_file_exists_p':
D:/Users/dmik/rpmbuild/BUILD/kbuild-0.1.9998.7/src/kmk/dir.c:719:13: warning: passing argument 1 of '_fnlwr' discards 'const' qualifier from pointer target type
     _fnlwr (filename); /* lower case for FAT drives */
             ^
In file included from D:/Users/dmik/rpmbuild/BUILD/kbuild-0.1.9998.7/src/kmk/make.h:332:0,
                 from D:/Users/dmik/rpmbuild/BUILD/kbuild-0.1.9998.7/src/kmk/dir.c:19:
C:/usr/lib/gcc/i386-pc-os2-emx/4.9.2/include-fixed/stdlib.h:455:6: note: expected 'char *' but argument is of type 'const char *'
 void _fnlwr (char *);
      ^

and

kBuild: Compiling kmk_time - D:/Users/dmik/rpmbuild/BUILD/kbuild-0.1.9998.7/src/misc/kmk_time.c
D:/Users/dmik/rpmbuild/BUILD/kbuild-0.1.9998.7/src/kObjCache/kObjCache.c: In function 'kOCEntrySpawn':
D:/Users/dmik/rpmbuild/BUILD/kbuild-0.1.9998.7/src/kObjCache/kObjCache.c:2758:42: warning: passing argument 3 of '_spawnvp' from incompatible pointer type
     rc = _spawnvp(_P_WAIT, papszArgv[0], papszArgv);
                                          ^
In file included from C:/usr/include/process.h:9:0,
                 from D:/Users/dmik/rpmbuild/BUILD/kbuild-0.1.9998.7/src/kObjCache/kObjCache.c:48:
C:/usr/include/sys/process.h:93:5: note: expected 'char * const*' but argument is of type 'const char * const*'
 int _spawnvp (int, const char *, char * const *);
     ^
D:/Users/dmik/rpmbuild/BUILD/kbuild-0.1.9998.7/src/kObjCache/kObjCache.c: In function 'kOCEntrySpawnChild':
D:/Users/dmik/rpmbuild/BUILD/kbuild-0.1.9998.7/src/kObjCache/kObjCache.c:2874:45: warning: passing argument 3 of '_spawnvp' from incompatible pointer type
     pid = _spawnvp(_P_NOWAIT, papszArgv[0], papszArgv);
                                             ^
In file included from C:/usr/include/process.h:9:0,
                 from D:/Users/dmik/rpmbuild/BUILD/kbuild-0.1.9998.7/src/kObjCache/kObjCache.c:48:
C:/usr/include/sys/process.h:93:5: note: expected 'char * const*' but argument is of type 'const char * const*'
 int _spawnvp (int, const char *, char * const *);
     ^

A new kbuild RPM (version 0.1.9998.7-1) with this patch is to appear shortly in the netlabs repositories.

Note: See TracTickets for help on using tickets.