Tracker item #2048423, was opened at 2008-08-12 12:35
Message generated for change (Comment added) made by adembo
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=989708&aid=2048423&group_id=204462

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nathan Charles (travalas)
Assigned to: Nobody/Anonymous (nobody)
Summary: Build fails on Fedora 9 and Ubuntu Intrepid Ibex

Initial Comment:
configure options:  --without-unity (because uri is backlevel i think)



gcc -DPACKAGE_NAME=\"open-vm-tools\" -DPACKAGE_TARNAME=\"open-vm-tools\" 
-DPACKAGE_VERSION=\"2008.08.08-109361\" -DPACKAGE_STRING=\"open-vm-tools\ 
2008.08.08-109361\" -DPACKAGE_BUGREPORT=\"[EMAIL PROTECTED]" 
-DPACKAGE=\"open-vm-tools\" -DVERSION=\"2008.08.08-109361\" -DSTDC_HEADERS=1 
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_ECVT=1 -DHAVE_FCVT=1 -DHAVE_CRYPT_H=1 
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_WCHAR_H=1 
-DHAVE_SYS_IO_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_SYSINFO_H=1 
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_USER_H=1 -DHAVE_SYS_VFS_H=1 -DHAVE_UNWIND_H=1 
-DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_STRUCT_STAT_ST_RDEV=1 
-DTIME_WITH_SYS_TIME=1 -DHAVE_LSEEK=1 -I.   -DUSING_AUTOCONF=1  -D_REENTRANT 
-I/usr/include -DUSE_ICU -DHAVE_ICU_38 -DVMX86_TOOLS -DNO_CORE_ICU 
-I/home/nathan/open-vm-tools
 -2008.08.08-109361/lib/include -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE 
-D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -I/usr/local/include 
-I/usr/include -I../../include -g -O2 -Wall -Werror -Wno-pointer-sign 
-Wno-unused-value -fno-strict-aliasing -Wno-unknown-pragmas -Wno-uninitialized 
-MT guestInfoPosix.o -MD -MP -MF .deps/guestInfoPosix.Tpo -c -o 
guestInfoPosix.o guestInfoPosix.c
cc1: warnings being treated as errors
guestInfoPosix.c: In function ReadInterfaceDetails:
guestInfoPosix.c:203: error: format not a string literal and no format arguments
make[2]: *** [guestInfoPosix.o] Error 1
make[2]: Leaving directory 
`/home/nathan/open-vm-tools-2008.08.08-109361/lib/guestInfo'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/nathan/open-vm-tools-2008.08.08-109361/lib'
make: *** [all-recursive] Error 1



----------------------------------------------------------------------

>Comment By: Adar Dembo (adembo)
Date: 2008-08-14 19:41

Message:
Logged In: YES 
user_id=1867590
Originator: NO

For what it's worth, I built an Intrepid VM, ran through the open-vm-tools
compilation, and fixed all the errors. I'll post the patches later.

----------------------------------------------------------------------

Comment By: Adar Dembo (adembo)
Date: 2008-08-13 11:35

Message:
Logged In: YES 
user_id=1867590
Originator: NO

It seems sane to me. Posix_Printf is intended to wrap the standard printf
function such that you can pass a set of UTF-8 encoded formatted arguments
into it (the ConstUnicode type is intended to represent UTF-8 encoded
strings), and it will firstly convert those arguments to a single string
encoded in the process's current encoding and secondly call the regular
printf on it.

The problem appears to be that printf is being called directly on a
string, which can actually lead to formatting string vulnerabilities (and
it appears that the compiler is sensitive to such vulnerabilities now). The
fix would be to change the printf(outCurr) call to printf("%s", outCurr).

As I said in an earlier comment, I'm going to hold off generating a patch
for this so that I can do something more comprehensive for Intrepid. If you
feel up to the task, feel free to patch these problems and I'll commit your
patches, provided you can sign the open-vm-tools contribution agreement.

----------------------------------------------------------------------

Comment By: Nathan Charles (travalas)
Date: 2008-08-13 07:12

Message:
Logged In: YES 
user_id=2178601
Originator: YES

Yes I am using the git repository.  

I applied that patch, but it still blows up.

cc1: warnings being treated as errors
../posixPosix.c: In function 'Posix_Printf':
../posixPosix.c:2984: error: format not a string literal and no format
arguments

I'm trying to get better at C and I was curious is that Posix_Printf
function really doing what it says it's doing?  BTW Thanks for your help in
this!


----------------------------------------------------------------------

Comment By: Adar Dembo (adembo)
Date: 2008-08-13 00:27

Message:
Logged In: YES 
user_id=1867590
Originator: NO

You're using the git repository, right?

Some of our modules ship our real includeCheck.h file while others simply
touch an empty version of that file at build-time (there's no good reason
for this inconsistency). Looks like vsock is the latter, and although
includeCheck.h exists in the tarball I uploaded to SF, when I patched the
git repository it dropped the file, presumably because it was empty.

I recreated the empty file, and it seems to have worked this time.

----------------------------------------------------------------------

Comment By: Adar Dembo (adembo)
Date: 2008-08-13 00:09

Message:
Logged In: YES 
user_id=1867590
Originator: NO

Alright, here's the patch for guestInfoPerfMonLinux.c.

If there's another such issue (and I imagine there is, if the compiler
flags on Intrepid now warn about not checking certain return values), I'll
stop generating one-off patches, build an Intrepid VM, get the
open-vm-tools building in it, and publish something more comprehensive.
File Added: guestInfoPerfMonLinux.c.patch

----------------------------------------------------------------------

Comment By: Nathan Charles (travalas)
Date: 2008-08-12 19:33

Message:
Logged In: YES 
user_id=2178601
Originator: YES

on Fedora 9 
it borks with 
  CC [M] 
/home/nathan/code/open-vm-tools/modules/linux/vsock/linux/af_vsock.o
In file included from
/home/nathan/code/open-vm-tools/modules/linux/vsock/linux/af_vsock.c:95:
/home/nathan/code/open-vm-tools/modules/linux/vsock/./include/driver-config.h:33:26:
error: includeCheck.h: No such file or directory

copying lib/include/includeCheck.h does let it build


----------------------------------------------------------------------

Comment By: Nathan Charles (travalas)
Date: 2008-08-12 18:57

Message:
Logged In: YES 
user_id=2178601
Originator: YES

looks like that causes it to blow up in a different way on ubuntu, 
haven't tried it on fedora 9 yet.

cc -DPACKAGE_NAME=\"open-vm-tools\" -DPACKAGE_TARNAME=\"open-vm-tools\"
-DPACKAGE_VERSION=\"2008.08.08-109361\" -DPACKAGE_STRING=\"open-vm-tools\
2008.08.08-109361\"
-DPACKAGE_BUGREPORT=\"[EMAIL PROTECTED]"
-DPACKAGE=\"open-vm-tools\" -DVERSION=\"2008.08.08-109361\"
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_ECVT=1
-DHAVE_FCVT=1 -DHAVE_CRYPT_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1
-DHAVE_STDLIB_H=1 -DHAVE_WCHAR_H=1 -DHAVE_SYS_IO_H=1 -DHAVE_SYS_PARAM_H=1
-DHAVE_SYS_SYSINFO_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_USER_H=1
-DHAVE_SYS_VFS_H=1 -DHAVE_UNWIND_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1
-DHAVE_STRUCT_STAT_ST_RDEV=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_LSEEK=1 -I.  
-DUSING_AUTOCONF=1  -D_REENTRANT -I/usr/include -DUSE_ICU -DHAVE_ICU_38
-DVMX86_TOOLS -DNO_CORE_ICU -I/home/nathan/code/open-vm-tools/lib/include
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=500
-D_BSD_SOURCE -D_SVID_SOURCE -I/usr/local/include -I/usr/include
-I../../include -g -O2 -Wall -Werror -Wno-pointer-sign -Wno-unused-value
-fno-strict-aliasing -Wno-unknown-pragmas -Wno-uninitialized -MT
guestInfoPerfMonLinux.o -MD -MP -MF .deps/guestInfoPerfMonLinux.Tpo -c -o
guestInfoPerfMonLinux.o guestInfoPerfMonLinux.c
cc1: warnings being treated as errors
guestInfoPerfMonLinux.c: In function GuestInfoMonitorReadMeminfo:
guestInfoPerfMonLinux.c:183: error: ignoring return value of fscanf,
declared with attribute warn_unused_result
make[2]: *** [guestInfoPerfMonLinux.o] Error 1
make[2]: Leaving directory
`/home/nathan/code/open-vm-tools/lib/guestInfo'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/nathan/code/open-vm-tools/lib'
make: *** [all-recursive] Error 1

----------------------------------------------------------------------

Comment By: Adar Dembo (adembo)
Date: 2008-08-12 18:14

Message:
Logged In: YES 
user_id=1867590
Originator: NO

Whoops, looks like I accidentally changed the summary back.

----------------------------------------------------------------------

Comment By: Adar Dembo (adembo)
Date: 2008-08-12 18:13

Message:
Logged In: YES 
user_id=1867590
Originator: NO

Doesn't look like this is a regression; that call to Str_Sprintf has been
there for some time.

In any case, does this patch fix the problem for you?

File Added: a.diff

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=989708&aid=2048423&group_id=204462

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
open-vm-tools-devel mailing list
open-vm-tools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-vm-tools-devel

Reply via email to