iChristian Skrevet 11. juni 2006 Del Skrevet 11. juni 2006 Dette er mitt første forsøk på å compile noe som helst, virkelig, og dette fant jeg ut at var litt vanskeligere enn hva jeg trodde. Jeg har skaffet meg en smartkort leser fra Buypass da jeg skal bruke denne med spillerkortet mitt fra Norsk Tipping Det er et kort som dette: Link og kortleseren som skal brukes er denne: Cardman 3121 (det er den øverste du ser når du trykker på linken, varenummer: 80101 Som man ser av produktbeskrivelsen (Link) så støtter denne kortleseren linux. Buypass har til og med laget en egen hjelpeside for linux (Link Der står det at man vil finne en pakke som heter pcsc lite i Synaptics, og denne kan jeg ikke finne. Det står også at man kan compile denne filen, noe jeg aldri har gjort før, så det tok litt tid før jeg kom i gang, blandt annet så var ikke build-essentials lagt inn noe jeg brukte litt tid på å finne ut. Jeg synes faktisk at det er ganske imponerende at det til og med er laget en guide for hvordan man skal kunne klare å gjøre dette ("Vedlegg A"). For å være helt ærlig, det var uventet kundeservice. Så etter langt om lenge så til kjernen av dette, jeg følger oppskriften for compiling("Vedlegg A") Problemene begynner for alvor etter å ha pakket ut tar-filen og kommet meg inn i terminalen for å bruke kommandoen: ./configure Da begynner den og konfigurere som ønsket, men det avslutter med følgende linjer: checking for LIBUSB... no checking for libusb-config... no configure: WARNING: libusb-config not found. checking usb.h usability... no checking usb.h presence... no checking for usb.h... no configure: error: usb.h not found, use ./configure LIBUSB_CFLAGS=... Hva skyldes dette og hvordan kan man løse dette? For å se mesteparten av som skjer i terminalvinduet mitt fra jeg trykker kommandoen så trykk for å vise den skjulte teksten under. Det som ikke er med er grunnet det at den øverste delen av teksten tydeligvis automatisk blir slettet når teksten blir for lang. Skjult tekst: (Marker innholdet i feltet for å se teksten): checking for pgf77... no checking for fort77... no checking for fl32... no checking for af77... no checking for f90... no checking for xlf90... no checking for pgf90... no checking for epcf90... no checking for f95... no checking for fort... no checking for xlf95... no checking for ifc... no checking for efc... no checking for pgf95... no checking for lf95... no checking for gfortran... no checking whether we are using the GNU Fortran 77 compiler... no checking whether accepts -g... no checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from c89 object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if c89 supports -fno-rtti -fno-exceptions... no checking for c89 option to produce PIC... -fPIC checking if c89 PIC flag -fPIC works... yes checking if c89 static flag -static works... yes checking if c89 supports -c -o file.o... yes checking whether the c89 linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ static flag -static works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate appending configuration tag "F77" to libtool checking for ANSI C header files... (cached) yes checking for sys/wait.h that is POSIX.1 compatible... yes checking dirent.h usability... yes checking dirent.h presence... yes checking for dirent.h... yes checking dl.h usability... no checking dl.h presence... no checking for dl.h... no checking for dlfcn.h... (cached) yes checking errno.h usability... yes checking errno.h presence... yes checking for errno.h... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking getopt.h usability... yes checking getopt.h presence... yes checking for getopt.h... yes checking malloc.h usability... yes checking malloc.h presence... yes checking for malloc.h... yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking for strings.h... (cached) yes checking sys/filio.h usability... no checking sys/filio.h presence... no checking for sys/filio.h... no checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking syslog.h usability... yes checking syslog.h presence... yes checking for syslog.h... yes checking for unistd.h... (cached) yes checking smartcard/scf.h usability... no checking smartcard/scf.h presence... no checking for smartcard/scf.h... no checking for an ANSI C-conforming const... yes checking for uid_t in sys/types.h... yes checking for size_t... yes checking whether time.h and sys/time.h may both be included... yes checking for error_at_line... yes checking whether lstat dereferences a symlink specified with a trailing slash... ye s checking whether stat accepts an empty string... no checking for vprintf... yes checking for _doprnt... no checking for daemon... yes checking for flock... yes checking for getopt_long... yes checking for nanosleep... yes checking for strerror... yes checking for vsnprintf... yes checking for strlcpy... no checking for strlcat... no checking for inline... __inline__ checking for -fvisibility=hidden... yes checking for dlopen in -ldl... yes checking for socket in -lsocket... no checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for LIBUSB... no checking for libusb-config... no configure: WARNING: libusb-config not found. checking usb.h usability... no checking usb.h presence... no checking for usb.h... no configure: error: usb.h not found, use ./configure LIBUSB_CFLAGS=... lomz@Osiris:~/pcsc-lite-1.3.1$ ./configure LIBUSB_CFLAGS=-02 checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking whether byte ordering is bigendian... no checking whether to enable maintainer-specific portions of Makefiles... no checking how to run the C preprocessor... gcc -E checking for a BSD-compatible install... /usr/bin/install -c checking whether ln -s works... yes checking whether make sets $(MAKE)... (cached) yes checking for flex... flex checking for yywrap in -lfl... yes checking lex output file root... lex.yy checking whether yytext is a pointer... yes checking for bash... /bin/bash checking for ksh... (cached) /bin/bash checking for sh... (cached) /bin/bash checking for the pthreads library -lpthreads... no checking whether pthreads work without any flags... no checking whether pthreads work with -Kthread... no checking whether pthreads work with -kthread... no checking for the pthreads library -llthread... no checking whether pthreads work with -pthread... yes checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE checking if more special flags are required for pthreads... no checking for cc_r... gcc checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking how to recognise dependent libraries... pass_all checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... gcc3 checking how to run the C++ preprocessor... g++ -E checking for g77... no checking for f77... no checking for xlf... no checking for frt... no checking for pgf77... no checking for fort77... no checking for fl32... no checking for af77... no checking for f90... no checking for xlf90... no checking for pgf90... no checking for epcf90... no checking for f95... no checking for fort... no checking for xlf95... no checking for ifc... no checking for efc... no checking for pgf95... no checking for lf95... no checking for gfortran... no checking whether we are using the GNU Fortran 77 compiler... no checking whether accepts -g... no checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ static flag -static works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate appending configuration tag "F77" to libtool checking for ANSI C header files... (cached) yes checking for sys/wait.h that is POSIX.1 compatible... yes checking dirent.h usability... yes checking dirent.h presence... yes checking for dirent.h... yes checking dl.h usability... no checking dl.h presence... no checking for dl.h... no checking for dlfcn.h... (cached) yes checking errno.h usability... yes checking errno.h presence... yes checking for errno.h... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking getopt.h usability... yes checking getopt.h presence... yes checking for getopt.h... yes checking malloc.h usability... yes checking malloc.h presence... yes checking for malloc.h... yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking for strings.h... (cached) yes checking sys/filio.h usability... no checking sys/filio.h presence... no checking for sys/filio.h... no checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking syslog.h usability... yes checking syslog.h presence... yes checking for syslog.h... yes checking for unistd.h... (cached) yes checking smartcard/scf.h usability... no checking smartcard/scf.h presence... no checking for smartcard/scf.h... no checking for an ANSI C-conforming const... yes checking for uid_t in sys/types.h... yes checking for size_t... yes checking whether time.h and sys/time.h may both be included... yes checking for error_at_line... yes checking whether lstat dereferences a symlink specified with a trailing slash... ye s checking whether stat accepts an empty string... no checking for vprintf... yes checking for _doprnt... no checking for daemon... yes checking for flock... yes checking for getopt_long... yes checking for nanosleep... yes checking for strerror... yes checking for vsnprintf... yes checking for strlcpy... no checking for strlcat... no checking for inline... inline checking for -fvisibility=hidden... yes checking for dlopen in -ldl... yes checking for socket in -lsocket... no checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for LIBUSB... no checking for libusb-config... no configure: WARNING: libusb-config not found. checking usb.h usability... no checking usb.h presence... no checking for usb.h... no configure: error: usb.h not found, use ./configure LIBUSB_CFLAGS=... lomz@Osiris:~/pcsc-lite-1.3.1$ make make: *** No targets specified and no makefile found. Stop. lomz@Osiris:~/pcsc-lite-1.3.1$ clear lomz@Osiris:~/pcsc-lite-1.3.1$ ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking whether byte ordering is bigendian... no checking whether to enable maintainer-specific portions of Makefiles... no checking how to run the C preprocessor... gcc -E checking for a BSD-compatible install... /usr/bin/install -c checking whether ln -s works... yes checking whether make sets $(MAKE)... (cached) yes checking for flex... flex checking for yywrap in -lfl... yes checking lex output file root... lex.yy checking whether yytext is a pointer... yes checking for bash... /bin/bash checking for ksh... (cached) /bin/bash checking for sh... (cached) /bin/bash checking for the pthreads library -lpthreads... no checking whether pthreads work without any flags... no checking whether pthreads work with -Kthread... no checking whether pthreads work with -kthread... no checking for the pthreads library -llthread... no checking whether pthreads work with -pthread... yes checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE checking if more special flags are required for pthreads... no checking for cc_r... gcc checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking how to recognise dependent libraries... pass_all checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... gcc3 checking how to run the C++ preprocessor... g++ -E checking for g77... no checking for f77... no checking for xlf... no checking for frt... no checking for pgf77... no checking for fort77... no checking for fl32... no checking for af77... no checking for f90... no checking for xlf90... no checking for pgf90... no checking for epcf90... no checking for f95... no checking for fort... no checking for xlf95... no checking for ifc... no checking for efc... no checking for pgf95... no checking for lf95... no checking for gfortran... no checking whether we are using the GNU Fortran 77 compiler... no checking whether accepts -g... no checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ static flag -static works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate appending configuration tag "F77" to libtool checking for ANSI C header files... (cached) yes checking for sys/wait.h that is POSIX.1 compatible... yes checking dirent.h usability... yes checking dirent.h presence... yes checking for dirent.h... yes checking dl.h usability... no checking dl.h presence... no checking for dl.h... no checking for dlfcn.h... (cached) yes checking errno.h usability... yes checking errno.h presence... yes checking for errno.h... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking getopt.h usability... yes checking getopt.h presence... yes checking for getopt.h... yes checking malloc.h usability... yes checking malloc.h presence... yes checking for malloc.h... yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking for strings.h... (cached) yes checking sys/filio.h usability... no checking sys/filio.h presence... no checking for sys/filio.h... no checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking syslog.h usability... yes checking syslog.h presence... yes checking for syslog.h... yes checking for unistd.h... (cached) yes checking smartcard/scf.h usability... no checking smartcard/scf.h presence... no checking for smartcard/scf.h... no checking for an ANSI C-conforming const... yes checking for uid_t in sys/types.h... yes checking for size_t... yes checking whether time.h and sys/time.h may both be included... yes checking for error_at_line... yes checking whether lstat dereferences a symlink specified with a trailing slash... ye s checking whether stat accepts an empty string... no checking for vprintf... yes checking for _doprnt... no checking for daemon... yes checking for flock... yes checking for getopt_long... yes checking for nanosleep... yes checking for strerror... yes checking for vsnprintf... yes checking for strlcpy... no checking for strlcat... no checking for inline... inline checking for -fvisibility=hidden... yes checking for dlopen in -ldl... yes checking for socket in -lsocket... no checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for LIBUSB... no checking for libusb-config... no configure: WARNING: libusb-config not found. checking usb.h usability... no checking usb.h presence... no checking for usb.h... no configure: error: usb.h not found, use ./configure LIBUSB_CFLAGS=... lomz@Osiris:~/pcsc-lite-1.3.1$ Hvordan løser man dette? Hva forårsaker dette? Jeg har klart å løse problemet uten å få svar på dette ovenfor, grunnen til at jeg fortsatt lurer er den at jeg ikke tror at dette blir siste gang jeg skal prøve å kompilere noe i linux, faktisk var det ganske gøy, og jeg bør da helst være forberedt og bør kunne litt om hva som skal til for å løse dette. Måten jeg klarte å løse dette på var at jeg så etter en ekstra gang i Synaptics etter pakken som de påstå burde ligge der, og vet dere, den gjorde det, men den het ikke det samme som de sa den ville hete. De sa den skulle hete: "pcsc lite" Den het: libpcsclite-dev (Det er også en som heter libpcsclite1 men den fant jeg tidligere på kvelden og den hjalp ikke til.) Virkelig surt å bruke så lang tid for å få det til når filen ligger rett der i synaptics bare med et annet navn. Men tilbake til det som er viktig, hvordan løse problemet i forhold til kompileringen? (Og ja, jeg vet det er teit å spørre om hjelp til noe man har klart å komme seg ut i fra, men jeg er fryktelig nysgjerrig.) Lenke til kommentar
Paull Skrevet 11. juni 2006 Del Skrevet 11. juni 2006 Ser ut til at den ikke finner libusb, et API for å kunne utvikle USB-drivere. Antakeligvis er denne pakken ikke installert, og dersom du finner tak i libusb og libusb-devel, og installerer disse, så burde det funke (eller i alle fall komme ett skritt videre). Lenke til kommentar
Anbefalte innlegg
Opprett en konto eller logg inn for å kommentere
Du må være et medlem for å kunne skrive en kommentar
Opprett konto
Det er enkelt å melde seg inn for å starte en ny konto!
Start en kontoLogg inn
Har du allerede en konto? Logg inn her.
Logg inn nå