Re: [linux-minidisc] Building himdformat against libscg on MacOSX
On Fri, May 07, 2010 at 10:19:55PM +0200, Adrian Glaubitz wrote:
> Hi,
> 
> after several nervous breakdowns, I finally managed to build
> himdformat on MacOS against libscg as included in cdrtools.
And here comes the howto for Linux (x86_64):
1) Download cdrecord:
   wget ftp://ftp.berlios.de/pub/cdrecord/alpha/cdrtools-beta.tar.gz
2) Untar and build it:
   tar xzf cdrtools-beta.tar.gz
   cd cdrtools-2.XX.XX
   make
3) Install it:
   sudo make install
   or
   su -c 'make install'
   Depending on your Linux distribution.
4) Patch /opt/schily/include/xconfig.h:
   glaubitz@z6:~> diff -u /opt/schily/include/schily/xconfig.h{~,}
   --- /opt/schily/include/schily/xconfig.h~	2010-05-07 22:48:18.000000000 +0200
   +++ /opt/schily/include/schily/xconfig.h	2010-05-07 22:48:58.000000000 +0200
   @@ -129,7 +129,7 @@
   #define  __JS_ARCH_CONF_INCL
   #endif
 
   -#ifdef __LINUX_X86_GCC
   +#ifdef __LINUX_X86_GCC64
   #include <schily/x86_64-linux-cc/xconfig.h>
   #define __JS_ARCH_CONF_INCL
   #endif
   glaubitz@z6:~> 
   Note, on x86 (i386) Linux systems, the patch looks slightly
   different. Will provide it later. But you can easily obtain it
   by adapting the above patch to a x86 installation.
5) Compile himdformat_scg.c with:
   gcc -D__LINUX_X86_GCC64 himdformat_scg.c -I/opt/schily/include -L/opt/schily/lib -lscg -lscgcmd -lschily -o himdformat_scg
6) Test run:
   glaubitz@z6:~> ./himdformat_scg 
   Please specify the path to the scsi device
   glaubitz@z6:~>
So, if we can get it compile on Windows as well, we've won the game
;).
Adrian