FU Logo
  • Startseite
  • Kontakt
  • Impressum
  • Home
  • Listenauswahl
  • Anleitungen

Re: [linux-minidisc] using libusal for scsi access

<-- thread -->
<-- date -->
  • From: Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
  • To: manner.moe@gmx.de
  • Date: Fri, 30 Apr 2010 13:41:55 +0200
  • Cc: linux-minidisc@lists.fu-berlin.de
  • Subject: Re: [linux-minidisc] using libusal for scsi access

On Sun, Apr 25, 2010 at 06:44:33PM +0200, Adrian Glaubitz wrote:
> > Here is a thread of the cdrkit mailing list which might help you compiling 
> > cdrkit/libusal on mac.
> > http://lists.alioth.debian.org/pipermail/debburn-devel/2008-October/000600.html
> 
> Hmm, unfortunately I still get a lot of erros during compilation. I
> will try getting in contact with the patch author, maybe he knows
> what's wrong. I presume that his patch was written for an earlier
> version of cdrkit. I will report back once I got a reply from him.

Ok, finally managed to get it compile after patching the cdrkit
sources in several places. I'm attaching the appropriate
patch. However, there is still something wrong, wodim cannot scan the
SCSI bus while it works with the version of cdrecord installed from
Macports:

minimac2:~ zedv$ wodim -scanbus
wodim: No such file or directory. 
Cannot open SCSI driver!
For possible targets try 'wodim --devices' or 'wodim -scanbus'.
For possible transport specifiers try 'wodim dev=help'.
For IDE/ATAPI devices configuration, see the file README.ATAPI.setup from
the wodim documentation.
minimac2:~ zedv$ cdrecord -scanbus
Cdrecord-ProDVD-ProBD-Clone 2.01.01a77 (i386-apple-macosx10.3.0) Copyright (C) 1995-2010 J�rg Schilling
Using libscg version 'schily-0.9'.
scsibus1:
	1,0,0	100) 'MATSHITA' 'DVD-R   UJ-846  ' 'FM3J' Removable CD-ROM
	1,1,0	101) *
	1,2,0	102) *
	1,3,0	103) *
	1,4,0	104) *
	1,5,0	105) *
	1,6,0	106) *
	1,7,0	107) *
minimac2:~ zedv$ 

I think that there must be some additional patch in Macports which
takes care of that (cdrecord was installed from Macpors in this case
while cdrkit was taken from upstream) and I will track that down and
patch cdrkit. Hope I can get himdformat to compile ASAP.

Adrian
diff -ru cdrkit-1.1.10/genisoimage/sha256.c cdrkit-1.1.10-mac/genisoimage/sha256.c
--- cdrkit-1.1.10/genisoimage/sha256.c	2009-10-11 20:27:59.000000000 +0200
+++ cdrkit-1.1.10-mac/genisoimage/sha256.c	2010-04-30 12:54:01.000000000 +0200
@@ -24,7 +24,7 @@
 
 /* Written by Ulrich Drepper <drepper@redhat.com>, 2007.  */
 
-#include <endian.h>
+#include <machine/endian.h>
 #include <stdlib.h>
 #include <string.h>
 #include <sys/types.h>
diff -ru cdrkit-1.1.10/genisoimage/sha256.h cdrkit-1.1.10-mac/genisoimage/sha256.h
--- cdrkit-1.1.10/genisoimage/sha256.h	2009-05-10 23:49:54.000000000 +0200
+++ cdrkit-1.1.10-mac/genisoimage/sha256.h	2010-04-30 13:05:55.000000000 +0200
@@ -28,7 +28,7 @@
 #include <limits.h>
 #include <stdint.h>
 #include <stdio.h>
-
+#define __THROW
 
 /* Structure to save state of computation between the single steps.  */
 struct sha256_ctx
diff -ru cdrkit-1.1.10/genisoimage/sha512.c cdrkit-1.1.10-mac/genisoimage/sha512.c
--- cdrkit-1.1.10/genisoimage/sha512.c	2009-10-11 20:27:59.000000000 +0200
+++ cdrkit-1.1.10-mac/genisoimage/sha512.c	2010-04-30 13:06:50.000000000 +0200
@@ -24,7 +24,7 @@
 
 /* Written by Ulrich Drepper <drepper@redhat.com>, 2007.  */
 
-#include <endian.h>
+#include <machine/endian.h>
 #include <stdlib.h>
 #include <string.h>
 #include <sys/types.h>
diff -ru cdrkit-1.1.10/genisoimage/sha512.h cdrkit-1.1.10-mac/genisoimage/sha512.h
--- cdrkit-1.1.10/genisoimage/sha512.h	2009-05-10 23:49:54.000000000 +0200
+++ cdrkit-1.1.10-mac/genisoimage/sha512.h	2010-04-30 13:06:11.000000000 +0200
@@ -28,7 +28,7 @@
 #include <limits.h>
 #include <stdint.h>
 #include <stdio.h>
-
+#define __THROW
 
 /* Structure to save state of computation between the single steps.  */
 struct sha512_ctx
diff -ru cdrkit-1.1.10/include/AddScgBits.cmake cdrkit-1.1.10-mac/include/AddScgBits.cmake
--- cdrkit-1.1.10/include/AddScgBits.cmake	2006-11-23 19:57:28.000000000 +0100
+++ cdrkit-1.1.10-mac/include/AddScgBits.cmake	2010-04-30 13:34:48.000000000 +0200
@@ -1,5 +1,5 @@
 
-IF(NOT GUARD_SCGCONFIG)
+If(NOT GUARD_SCGCONFIG)
    SET(GUARD_SCGCONFIG 1)
 
 
@@ -58,8 +58,18 @@
    CHECK_C_SOURCE_COMPILES("${TESTSRC}" LIBC_SCHED)
 
 IF(NOT LIBC_SCHED)
-   LIST(APPEND EXTRA_LIBS -lrt)
-   #MESSAGE("Using librt for realtime functions")
+   SET(CMAKE_REQUIRED_LIBRARIES librt)
+      CHECK_C_SOURCE_COMPILES("${TESTSRC}" LIBRT_SCHED)
+   IF(LIBRT_SCHED)
+      LIST(APPEND EXTRA_LIBS -lrt)
+      #MESSAGE("Using librt for realtime functions")
+   ENDIF(LIBRT_SCHED)
 ENDIF(NOT LIBC_SCHED)
 
+IF(APPLE)
+   FIND_LIBRARY(COREFOUNDATION CoreFoundation)
+   FIND_LIBRARY(IOKIT IOKit)                                        
+   LIST(APPEND EXTRA_LIBS ${COREFOUNDATION} ${IOKIT})
+ENDIF(APPLE)
+
 ENDIF(NOT GUARD_SCGCONFIG)
diff -ru cdrkit-1.1.10/libusal/scsi-mac-iokit.c cdrkit-1.1.10-mac/libusal/scsi-mac-iokit.c
--- cdrkit-1.1.10/libusal/scsi-mac-iokit.c	2006-12-08 14:38:43.000000000 +0100
+++ cdrkit-1.1.10-mac/libusal/scsi-mac-iokit.c	2010-04-30 12:52:05.000000000 +0200
@@ -62,6 +62,6 @@
 #include <Carbon/Carbon.h>
 #include <IOKit/IOKitLib.h>
 #include <IOKit/IOCFPlugIn.h>
-#include <IOKit/scsi-commands/SCSITaskLib.h>
+#include <IOKit/scsi/SCSITaskLib.h>
 #include <mach/mach_error.h>
 
 struct usal_local {
<-- thread -->
<-- date -->
  • References:
    • Re: [linux-minidisc] using libusal for scsi access
      • From: manner.moe@gmx.de
    • Re: [linux-minidisc] using libusal for scsi access
      • From: Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
  • linux-minidisc - April 2010 - Archives indexes sorted by:
    [ thread ] [ subject ] [ author ] [ date ]
  • Complete archive of the linux-minidisc mailing list
  • More info on this list...

Hilfe

  • FAQ
  • Dienstbeschreibung
  • ZEDAT Beratung
  • postmaster@lists.fu-berlin.de

Service-Navigation

  • Startseite
  • Listenauswahl

Einrichtung Mailingliste

  • ZEDAT-Portal
  • Mailinglisten Portal