delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/12/26/12:22:24.1

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Pierre Bernhardt <pierre AT starcumulus DOT owl DOT de>
Subject: Newbee problem at compile mtx scsi changer tool
Date: Tue, 26 Dec 2006 16:18:28 +0100
Lines: 132
Message-ID: <emreg3$ns3$1@sea.gmane.org>
Mime-Version: 1.0
User-Agent: Thunderbird 1.5.0.9 (Windows/20061207)
OpenPGP: id=346A64D5
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Hello,

I want to bring mtx to cygwin so I can use my changer
from windows.

I've download the source from
ftp://ftp.badtux.net/pub/storage/mtx/mtx-1.2.18rel.tar.gz

./configure looks ok for me but possible without scsi:

$ ./configure
creating cache ./config.cache
checking host system type... i686-pc-cygwin
checking target system type... i686-pc-cygwin
checking build system type... i686-pc-cygwin
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for a BSD compatible install... /usr/bin/install -c
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for unistd.h... yes
checking for stdlib.h... yes
checking for errno.h... yes
checking for fcntl.h... yes
checking for stdarg.h... yes
checking for string.h... yes


checking for scsi/scsi.h... no
checking for scsi/scsi_ioctl.h... no
checking for scsi/sg.h... no
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I think the problem comes from here...


checking for sys/gscdds.h... no
checking for camlib.h... no
checking for cam/cam_ccb.h... no
checking for cam/scsi/scsi_message.h... no
checking for sys/fsid.h... no
checking for sys/fstyp.h... no
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for sys/mnttab.h... no
checking for sys/param.h... yes
checking for sys/time.h... yes
checking for sys/scsi/impl/uscsi.h... no
checking for sys/scsi.h... no
checking for sys/scsi_ctl.h... no
checking for sys/ioctl.h... yes
checking for dslib.h... no
checking for du/defs.h... no
checking for working const... yes
checking for size_t... yes
checking for pid_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking size of int... 4
checking size of long... 4
checking whether byte ordering is bigendian... no
checking return type of signal handlers... void
checking for vprintf... yes
updating cache ./config.cache
creating ./config.status
creating Makefile
creating config.h

But make is failing and I have no idea why:

$ make
gcc -g -O2 -DVERSION="\"1.2.18rel\""  -c -o mtx.o mtx.c
In file included from mtx.c:40:
mtxl.h:35: error: parse error before "SCSI_OpenDevice"
mtxl.h:35: warning: data definition has no type or storage class
mtxl.h:36: error: parse error before "DEVICE_TYPE"
mtxl.h:37: error: parse error before "DeviceFD"
mtxl.h:52: error: parse error before "MediumChangerFD"
mtxl.h:54: error: parse error before "fd"
mtxl.h:56: error: parse error before "MediumChangerFD"
mtxl.h:61: error: parse error before "MediumChangerFD"
mtxl.h:62: error: parse error before "fd"
mtxl.h:63: error: parse error before "fd"
mtx.c:90: error: parse error before "MediumChangerFD"
mtx.c:90: error: `DEVICE_TYPE' undeclared here (not in a function)
mtx.c:90: error: parse error before numeric constant
make: *** [mtx.o] Error 1

Checking mtxl.h:

...
    28 #include "mtx.h"
    29
    30 void FatalError(char *ErrorMessage, ...);
    31 void *xmalloc(size_t Size);
    32 void *xzmalloc(size_t Size);
    33 void slow_bzero(char *buffer, int numchars);
    34
    35 DEVICE_TYPE SCSI_OpenDevice(char *DeviceName);
    36 void SCSI_CloseDevice(char *DeviceName, DEVICE_TYPE DeviceFD);
    37 int SCSI_ExecuteCommand(DEVICE_TYPE DeviceFD,
    38                                Direction_T Direction,
    39                                CDB_T *CDB,
    40                                int CDB_Length,
    41                                void *DataBuffer,
    42                                int DataBufferLength,
    43                                RequestSense_T *RequestSense);
    44
...

checking mtx.c:

...
     90 static DEVICE_TYPE MediumChangerFD = (DEVICE_TYPE) 0;
     91 static int device_opened = 0;  /* okay, replace check here. */
     92
     93 /* was: static int MediumChangerFD=-1; *//* open filehandle to that devi
     93 ce */
     94 static int arg1=-1;       /* first arg to command */
     95 static int arg2=-1;       /* second arg to command */
     96
     97 static SCSI_Flags_T SCSI_Flags = { 0, 0, 0,0 };
     98
...

Could anybody help me to identify the missing or problem?

Thank you,
Pierre Bernhardt



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019