From: SourceForge.net <no...@so...> - 2010-04-16 16:43:48
|
Bugs item #2986267, was opened at 2010-04-13 05:45 Message generated for change (Comment added) made by larsr You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108874&aid=2986267&group_id=8874 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: libgphoto2_port Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Ryan Woodsmall (rwoodsmall) Assigned to: Marcus Meissner (marcusmeissner) Summary: usbscsi module breaks 2.4.9 build on Mac OS X Initial Comment: I'm hosting a project that builds a somewhat self-contained Wine on Mac OS X and it integrates libgphoto2: http://code.google.com/p/osxwinebuilder/ libusb 0.1.12 is also included in the build, and the new 2.4.9 release has an issue that I've not seen before. Namely, the "usbscsi" module in the libgphoto2_port subproject appears to be Linux-specific (including scsi/sg.h), but it's being picked up on my OS X machine. Is this the expected behavior with libusb on Mac OS X? Should the usbscsi module be picked up on anything *except* Linux? I'll attach the main libgphoto2 config.log as well as the output of a configure/make on my OS X machine when the issue is created. Thanks, and let me know what else I can provide! ---------------------------------------------------------------------- Comment By: Lars Rasmusson (larsr) Date: 2010-04-16 18:43 Message: It's this patch: http://gphoto.svn.sourceforge.net/viewvc/gphoto/trunk/libgphoto2/libgphoto2_port/usbscsi/linux.c?r1=12992&r2=12857&view=patch ---------------------------------------------------------------------- Comment By: Lars Rasmusson (larsr) Date: 2010-04-16 18:33 Message: Just apply the patch from the SVN repo that ifdefs away the code, and you can compile cleanly. --- libgphoto2_port/usbscsi/linux.c 2010/03/29 09:39:26 12857 +++ libgphoto2_port/usbscsi/linux.c 2010/04/11 19:01:46 12992 @@ -27,8 +27,12 @@ #include <sys/stat.h> #include <sys/types.h> #include <sys/param.h> -#include <sys/ioctl.h> -#include <scsi/sg.h> +#ifdef HAVE_SYS_IOCTL_H +# include <sys/ioctl.h> +#endif +#ifdef HAVE_SCSI_SG_H +# include <scsi/sg.h> +#endif #ifdef HAVE_LOCKDEV # include <lockdev.h> #endif @@ -297,6 +301,7 @@ static int gp_port_usbscsi_send_scsi_cmd (GPPort *port, int to_dev, char *cmd, int cmd_size, char *sense, int sense_size, char *data, int data_size) { +#ifdef HAVE_SCSI_SG_H sg_io_hdr_t io_hdr; if (!port) @@ -328,6 +333,9 @@ } return GP_OK; +#else + return GP_ERROR_NOT_SUPPORTED; +#endif } static int ---------------------------------------------------------------------- Comment By: Marcus Meissner (marcusmeissner) Date: 2010-04-15 10:16 Message: if you see other issues, please also tell. i am currently considering just to release an intermediate 2.4.9.1 release for this buildfix :/ ---------------------------------------------------------------------- Comment By: Ryan Woodsmall (rwoodsmall) Date: 2010-04-14 18:09 Message: Excellent! Thank your for the quick turnaround. I'll check out the workarounds in SVN and will do a manual disable for the time being. ---------------------------------------------------------------------- Comment By: Marcus Meissner (marcusmeissner) Date: 2010-04-14 17:50 Message: no, its an oversight. i have in SVN now code that does autoconf checks for scsi/sg.h ... it builds the module now, but it woonbt trigger. you could also disable build of it manually. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108874&aid=2986267&group_id=8874 |