#43508 closed submission (fixed)
vmdktool 1.3
Reported by: | glenn@… | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.2.1 |
Keywords: | Cc: | cooljeanius (Eric Gallager) | |
Port: | vmdktool |
Description
vmdktool (http://www.freshports.org/sysutils/vmdktool/) converts raw filesystems to VMDK files and vice versa.
VMDK files can be imported directly into most Virtual Machine servers as guest filesystems. Automatic machine deployments into products such as VMware's ESXi and VirtualBox requires the ability to construct VMDK files as the initial filesystem images for the created guests.
Attachments (4)
Change History (12)
Changed 11 years ago by glenn@…
Attachment: | patch-Makefile.diff added |
---|
Changed 11 years ago by glenn@…
Attachment: | patch-expand_number.c.diff added |
---|
comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Milestone: | MacPorts 2.3.0 |
---|
Changed 11 years ago by glenn@…
comment:2 Changed 11 years ago by glenn@…
Fair enough - uploaded new version without comments. This is the first portfile I've developed so I was commenting it heavily as I developed it, but agreed the comments are probably not needed in the committed version.
comment:3 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Owner: | changed from macports-tickets@… to ryandesign@… |
---|---|
Port: | vmdktool added |
Status: | new → assigned |
comment:4 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
I'm attaching a revised portfile in which I:
- changed the whitespace from tabs to spaces to conform to the modeline (and what we usually do)
- moved a few lines around
- smartened an apostrophe in the description
- removed sentence "vmdktool is free" from long description because that's implied by the license being BSD (and by the port being in MacPorts, really)
- removed sentence "Contact the author with any questions or comments" because that's implied for any software product
Remaining issues:
- because the port uses "use_configure no", we must add code to ensure we're UsingTheRightCompiler and
-arch
flags, and if possible add a universal variant - the port does not build for me on OS X 10.9.2 Mavericks with Xcode 5.1.1:
cc -Wsystem-headers -Wno-format-y2k -W -Werror -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wunused -g -O -pipe -c -o vmdktool.o vmdktool.c In file included from vmdktool.c:44: In file included from /opt/local/include/zlib.h:34: In file included from /opt/local/include/zconf.h:427: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.1/include/stdarg.h:30:27: error: redefinition of typedef 'va_list' is a C11 feature [-Werror,-Wtypedef-redefinition] typedef __builtin_va_list va_list; ^ /usr/include/sys/_types/_va_list.h:31:26: note: previous definition is here typedef __darwin_va_list va_list; ^ 1 error generated.
Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Attachment: | Portfile.2 added |
---|
comment:5 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
There seems to be a slightly different definition of a type that zlib is using between Xcode's clang and the Mavericks system headers. This isn't vmdktool's fault, but vmdktool's Makefile has requested that this warning, and all warnings, be treated as errors, by using the -Werror
flag. We usually don't want to build anything in MacPorts with the -Werror
flag, because newer compilers have warnings about new conditions that developers might not have considered before. Expanding the existing Makefile patch to remove -Werror
allows the build to succeed.
The error also shows us that vmdktool is using zlib, so it needs a dependency on zlib.
As for the expand_number.c diff, I was able to build the port on Mavericks without it. What problem did you encounter? I'll commit it without the patch for now, and see if any of the buildslaves complain.
Adding the right -arch
flags, universal variant and compiler choice were easy since the Makefile respects the CC and CFLAGS environment variables.
I added "test.run yes" since the Makefile does have a test target, and it does pass for me when I then run "port test".
I also fixed the livecheck.
Committed in r119548.
comment:6 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Successful build on all four buildslaves.
comment:7 Changed 11 years ago by glenn@…
Thanks for all the fixes, Ryan. I was building under 10.8.5 rather than 10.9.2 (but still Xcode 5.1.1) which may explain the discrepancies. I made the patch in expand_number.c because without it I was encountering the following error:
expand_number.c:76:6: error: implicit declaration of function 'tolower' is invalid in C99 [-Werror,-Wimplicit-function-declaration] s = tolower(*endptr); ^ 1 error generated. make: *** [expand_number.o] Error 1
But as you noted removing -Werror appears to be a more appropriate fix.
Thanks!
I'm inclined to remove the comments from the portfile.