ELM 327 e Slackware

Usate questo forum per richieste di aiuto e consigli sull'hardware montato nelle vostre macchine con GNU/Linux Slackware.

Moderatore: Staff

Regole del forum
1) Citare sempre la versione di Slackware usata e la versione del Kernel. Questi dati aiutano le persone che possono rispondere.
2) Citare il tipo di hardware coinvolto in modo dettagliato.
3) Leggere attentamente le risposte ricevute
4) Scrivere i messaggi con il colore di default, evitare altri colori.
5) Scrivere in Italiano o in Inglese, se possibile grammaticalmente corretto, evitate stili di scrittura poco chiari, quindi nessuna abbreviazione tipo telegramma o scrittura stile SMS o CHAT. Non usare termini gergali come procio, mobo e simili per identificare i componenti hardware.
6) Appena registrati è consigliato presentarsi nel forum dedicato.

La non osservanza delle regole porta a provvedimenti di vari tipo da parte dello staff, in particolare la non osservanza della regola 5 porta alla cancellazione del post e alla segnalazione dell'utente. In caso di recidività l'utente rischia il ban temporaneo.
Rispondi
Avatar utente
darkstaring
Linux 3.x
Linux 3.x
Messaggi: 657
Iscritto il: mer 13 ott 2010, 13:55
Nome Cognome: Francesco Achenza
Desktop: KDE
Distribuzione: Arch Linux
Contatta:

ELM 327 e Slackware

Messaggio da darkstaring »

olàà ragazzi :)
fatemi gli auguri, ho fatto il primo acquisto online!!! :)
Ho preso una Elm 327 da ebay e forrei farla funzionare con Slackware..
ora nn ho tempo di smanettare comunque la vede:

Codice: Seleziona tutto

#inserisco la periferica
bash-4.1$ tree /dev/ > temp
# rimuovo la perif
bash-4.1$ tree /dev/ > temp1
bash-4.1$ diff temp temp1 
53,54c53
< |       |   |-- 001
< |       |   `-- 002
---
> |       |   `-- 001
499,503d497
< |-- serial
< |   |-- by-id
< |   |   `-- usb-FTDI_FT232R_USB_UART_A100QA7V-if00-port0 -> ../../ttyUSB0
< |   `-- by-path
< |       `-- pci-0000:00:1d.0-usb-0:1:1.0-port0 -> ../../ttyUSB0
627d620
< |-- ttyUSB0
636d628
< |-- usbdev5.2
676c668
< 36 directories, 637 files
---
> 33 directories, 632 files
bash-4.1$ 
Conoscete niente per linux???
Io ho trovat scantool_net e freediag.. ma li dev ancora compilare.... slackbuild?

hashbang
Packager
Packager
Messaggi: 2021
Iscritto il: ven 4 giu 2010, 10:27
Nome Cognome: Luca De Pandis
Distribuzione: macOS/OpenBSD
Località: Lecce/Bergamo

Re: ELM 327 e Slackware

Messaggio da hashbang »

freediag.SlackBuild

Codice: Seleziona tutto

#!/bin/sh

# Heavily based on the Slackware 13.37 SlackBuild (v1)

# Written by Luca De Pandis aka atomix600 (atomix600(at)hotmail(dot)it)

# Slackware build script for freediag
# Official Site: http://freediag.sourceforge.net

# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

set -e

PKGNAME=${PKGNAME:-freediag}
VERSION=${VERSION:-1.00c}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-sl}
PKGTYPE=${PKGTYPE:-txz}
SOURCE=${SOURCE:-http://heanet.dl.sourceforge.net/project/$PKGNAME/$PKGNAME/1.0/$PKGNAME-$VERSION.7z}

CWD=$(pwd)
TMP=${TMP:-/tmp/buildpkgs/$PKGNAME}
PKG=${PKG:-$TMP/package-$PKGNAME}
OUTPUT=${OUTPUT:-$CWD}

if [ ! -e $PKGNAME-$VERSION.7z ]; then
	wget $SOURCE
fi

CHOST=i486
if [ $ARCH = i486 ]; then
	SLKCFLAGS="-O2 -march=i486 -mtune=i686"
	LIBIRSUFFIX=""
elif [ $ARCH = i586 ]; then
	SLKCFLAGS="-O2 -march=i586 -mtune=i686"
	LIBDIRSUFFIX=""
elif [ $ARCH = i686 ]; then
	SLKCFLAGS="-O2 -march=i686 -mtune=i686"
	LIBDIRSUFFIX=""
elif [ $ARCH = x86_64 ]; then
	SLKCFLAGS="-O2 -fPIC"
	LIBDIRSUFFIX="64"
	CHOST=x86_64
fi

rm -rf $TMP
mkdir -p $TMP $PKG $OUTPUT

cd $TMP
7z x $CWD/$PKGNAME-$VERSION.7z
cd $PKGNAME-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --localstatedir=/var \
    --mandir=/usr/man \
    --libdir=/usr/lib$LIBDIRSUFFIX \
    --build=$CHOST-slackware-linux
make
make install DESTDIR=$PKG

mkdir -p $PKG/usr/doc/$PKGNAME-$VERSION
    cp -a \
    AUTHORS C* INSTALL NEWS OLD_CHANGES README \
    $PKG/usr/doc/$PKGNAME-$VERSION
cat $CWD/$PKGNAME.SlackBuild > $PKG/usr/doc/$PKGNAME-$VERSION/$PKGNAME.SlackBuild
cat $CWD/slack-desc > $PKG/usr/doc/$PKGNAME-$VERSION/slack-desc

if [ -d $PKG/usr/man ]; then
    ( cd $PKG/usr/man
      find . -type f -exec gzip -9 {} \;
      for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
    )
fi

( cd $PKG
  find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs -r strip --strip-unneeded 2> /dev/null || true
  find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs -r strip --strip-unneeded 2> /dev/null || true
  find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs -r strip --strip-unneeded 2> /dev/null || true
)

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
chown -R root:root $PKG

if [ -x "$(which requiredbuilder 2>/dev/null)" ]; then
    requiredbuilder -y -v -s $CWD $PKG
fi

/sbin/makepkg -l y -c n $OUTPUT/$PKGNAME-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE

if [ "$1" = "--cleanup" ]; then
    rm -rf $TMP
fi
slack-desc

Codice: Seleziona tutto

# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|' on
# the right side marks the last column you can put a character in.  You must make
# exactly 11 lines for the formatting to be correct.  It's also customary to
# leave one space after the ':'.

        |-----handy-ruler------------------------------------------------------|
freediag: freediag (Vehicle Diagnostic Suite)
freediag:
freediag: Freediag is a suite of vehicle diagnostic protocols and an OBD II
freediag: (mostly) compliant ScanTool, currently for Linux platforms. Multiple
freediag: graphical user interfaces for scantool are under development - but
freediag: right now, you have to use a command-line interface to scantool.
freediag:
freediag:
freediag:
freediag:
freediag:
Allegro (richiesto da scantool_net) lo trovi nel repository di Slacky (se non c'è nel repository x86_64, ti basterà prendere i sorgenti del pacchetto nel repository x86)

scantool_net è in arrivo. Intanto ho pubblicato questi.

PS: Non sto su Slackware, quindi non ho testato lo SlackBuild. Se c'è qualche bug segnalalo.

hashbang
Packager
Packager
Messaggi: 2021
Iscritto il: ven 4 giu 2010, 10:27
Nome Cognome: Luca De Pandis
Distribuzione: macOS/OpenBSD
Località: Lecce/Bergamo

Re: ELM 327 e Slackware

Messaggio da hashbang »

dzcomm (altra dipendenza di scantool)

dzcomm.SlackBuild

Codice: Seleziona tutto

#!/bin/sh

# Heavily based on the Slackware 13.37 SlackBuild (v1)

# Written by Luca De Pandis aka atomix600 (atomix600(at)hotmail(dot)it)

# Slackware build script for dzcomm
# Official Site: http://dzcomm.sourceforge.net/

# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

set -e

PKGNAME=${PKGNAME:-dzcomm}
VERSION=${VERSION:-0.9.9i}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-sl}
PKGTYPE=${PKGTYPE:-txz}
SOURCE=${SOURCE:-http://dfn.dl.sourceforge.net/project/$PKGNAME/$PKGNAME/$VERSION/dz099i.zip}

CWD=$(pwd)
TMP=${TMP:-/tmp/buildpkgs/$PKGNAME}
PKG=${PKG:-$TMP/package-$PKGNAME}
OUTPUT=${OUTPUT:-$CWD}

if [ ! -e dz099i.zip ]; then
   wget $SOURCE
fi

CHOST=i486
if [ $ARCH = i486 ]; then
   SLKCFLAGS="-O2 -march=i486 -mtune=i686"
   LIBIRSUFFIX=""
elif [ $ARCH = i586 ]; then
   SLKCFLAGS="-O2 -march=i586 -mtune=i686"
   LIBDIRSUFFIX=""
elif [ $ARCH = i686 ]; then
   SLKCFLAGS="-O2 -march=i686 -mtune=i686"
   LIBDIRSUFFIX=""
elif [ $ARCH = x86_64 ]; then
   SLKCFLAGS="-O2 -fPIC"
   LIBDIRSUFFIX="64"
   CHOST=x86_64
fi

rm -rf $TMP
mkdir -p $TMP $PKG $OUTPUT

cd $TMP
unzip $CWD/dz099i.zip
cd dz099i
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
./fixunix.sh
./configure \
    --prefix=/usr \
    --libdir=/usr/lib$LIBDIRSUFFIX \
    --mandir=/usr/man \
    --sysconfdir=/etc \
    --localstatedir=/var \
    --disable-static \
    --enable-shared \
    --build=$CHOST-slackware-linux
make
make prefix=$PKG/usr install

mkdir -p $PKG/usr/doc/$PKGNAME-$VERSION
    cp -a \
    AUTHORS CHANGES THANKS \
    $PKG/usr/doc/$PKGNAME-$VERSION
cat $CWD/$PKGNAME.SlackBuild > $PKG/usr/doc/$PKGNAME-$VERSION/$PKGNAME.SlackBuild
cat $CWD/slack-desc > $PKG/usr/doc/$PKGNAME-$VERSION/slack-desc

if [ -d $PKG/usr/man ]; then
    ( cd $PKG/usr/man
      find . -type f -exec gzip -9 {} \;
      for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
    )
fi

( cd $PKG
  find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs -r strip --strip-unneeded 2> /dev/null || true
  find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs -r strip --strip-unneeded 2> /dev/null || true
  find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs -r strip --strip-unneeded 2> /dev/null || true
)

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
chown -R root:root $PKG

if [ -x "$(which requiredbuilder 2>/dev/null)" ]; then
    requiredbuilder -y -v -s $CWD $PKG
fi

/sbin/makepkg -l y -c n $OUTPUT/$PKGNAME-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE

if [ "$1" = "--cleanup" ]; then
    rm -rf $TMP
fi
slack-desc

Codice: Seleziona tutto

# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|' on
# the right side marks the last column you can put a character in.  You must make
# exactly 11 lines for the formatting to be correct.  It's also customary to
# leave one space after the ':'.

      |-----handy-ruler------------------------------------------------------|
dzcomm: dzcomm (Vehicle Diagnostic Suite)
dzcomm:
dzcomm: DZCOMM is a API for doing serial I/O under DOS, Linux and SunOS.
dzcomm:
dzcomm:
dzcomm:
dzcomm:
dzcomm:
dzcomm:
dzcomm:
dzcomm:
Ovviamente, vale lo stesso discorso fatto per freediag

hashbang
Packager
Packager
Messaggi: 2021
Iscritto il: ven 4 giu 2010, 10:27
Nome Cognome: Luca De Pandis
Distribuzione: macOS/OpenBSD
Località: Lecce/Bergamo

Re: ELM 327 e Slackware

Messaggio da hashbang »

scantool_net

scantool_net.SlackBuild

Codice: Seleziona tutto

#!/bin/sh

# Heavily based on the Slackware 13.37 SlackBuild (v1)

# Written by Luca De Pandis aka atomix600 (atomix600(at)hotmail(dot)it)

# Slackware build script for ScanTool.net
# Official Site: http://www.scantool.net

# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

set -e

PKGNAME=${PKGNAME:-scantool_net}
VERSION=${VERSION:-1.13}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-sl}
PKGTYPE=${PKGTYPE:-txz}
SOURCE=${SOURCE:-http://kent.dl.sourceforge.net/project/scantool/ScanTool.net/$VERSION/${PKGNAME}113src.zip}

CWD=$(pwd)
TMP=${TMP:-/tmp/buildpkgs/$PKGNAME}
PKG=${PKG:-$TMP/package-$PKGNAME}
OUTPUT=${OUTPUT:-$CWD}

if [ ! -e ${PKGNAME}113src.zip ]; then
   wget $SOURCE
fi

CHOST=i486
if [ $ARCH = i486 ]; then
   SLKCFLAGS="-O2 -march=i486 -mtune=i686"
   LIBIRSUFFIX=""
elif [ $ARCH = i586 ]; then
   SLKCFLAGS="-O2 -march=i586 -mtune=i686"
   LIBDIRSUFFIX=""
elif [ $ARCH = i686 ]; then
   SLKCFLAGS="-O2 -march=i686 -mtune=i686"
   LIBDIRSUFFIX=""
elif [ $ARCH = x86_64 ]; then
   SLKCFLAGS="-O2 -fPIC"
   LIBDIRSUFFIX="64"
   CHOST=x86_64
fi

rm -rf $TMP
mkdir -p $TMP $PKG $OUTPUT

cd $TMP
mkdir -p $PKGNAME-$VERSION
cd $PKGNAME-$VERSION
unzip $CWD/${PKGNAME}113src.zip
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
patch -p1 -i $CWD/unix-binary.patch
make
install -Dm 755 scantool $PKG/usr/bin/scantool
install -Dm 644 scantool.dat $PKG/usr/share/scantool/scantool.dat
install -Dm 644 codes.dat $PKG/usr/share/scantool/codes.dat
install -Dm 644 scantool.1 $PKG/usr/man/man1/scantool.1

mkdir -p $PKG/usr/doc/$PKGNAME-$VERSION
    cp -a \
    gpl.txt readme.txt todo.txt \
    $PKG/usr/doc/$PKGNAME-$VERSION
cat $CWD/$PKGNAME.SlackBuild > $PKG/usr/doc/$PKGNAME-$VERSION/$PKGNAME.SlackBuild
cat $CWD/slack-desc > $PKG/usr/doc/$PKGNAME-$VERSION/slack-desc

if [ -d $PKG/usr/man ]; then
    ( cd $PKG/usr/man
      find . -type f -exec gzip -9 {} \;
      for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
    )
fi

( cd $PKG
  find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs -r strip --strip-unneeded 2> /dev/null || true
  find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs -r strip --strip-unneeded 2> /dev/null || true
  find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs -r strip --strip-unneeded 2> /dev/null || true
)

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
chown -R root:root $PKG

if [ -x "$(which requiredbuilder 2>/dev/null)" ]; then
    requiredbuilder -y -v -s $CWD $PKG
fi

/sbin/makepkg -l y -c n $OUTPUT/$PKGNAME-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE

if [ "$1" = "--cleanup" ]; then
    rm -rf $TMP
fi
Se lo slackbuild da errore riguardo alla mancanza della pagina di man scantool.1, prendi la man presente subito sotto, decomprimila (con gzip -d. Purtroppo il sito non ha accettato la manpages non compressa) e mettila nella directory dello slackbuild.
scantool.1.gz
Poi, nello slackbuild, modifica la riga

Codice: Seleziona tutto

install -Dm 644 scantool.1 $PKG/usr/man/man1/scantool.1
in

Codice: Seleziona tutto

install -Dm 644 $CWD/scantool.1 $PKG/usr/man/man1/scantool.1

unix-binary.patch

Codice: Seleziona tutto

--- a/makefile	2006-05-23 02:23:52.000000000 +0200
+++ b/makefile	2012-01-30 18:12:41.000000000 +0100
@@ -40,7 +40,7 @@
 endif
 
 OBJ += main.o main_menu.o serial.o options.o sensors.o trouble_code_reader.o custom_gui.o error_handlers.o about.o
-BIN = ScanTool.exe
+BIN = scantool
 
 ifdef MINGDIR
 endif
slack-desc

Codice: Seleziona tutto

# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|' on
# the right side marks the last column you can put a character in.  You must make
# exactly 11 lines for the formatting to be correct.  It's also customary to
# leave one space after the ':'.

            |-----handy-ruler------------------------------------------------------|
scantool_net: scantool.net (OBD-II Software Front End)
scantool_net:
scantool_net: ScanTool.net OBD-II software lets you turn your laptop or desktop PC
scantool_net: into a sophisticated automotive diagnostics system. Currently, it can
scantool_net: be used to read trouble codes, display their definitions, reset the
scantool_net: MIL, and display real-time sensor data.
scantool_net:
scantool_net:
scantool_net:
scantool_net:
scantool_net:
Anche qui, stesso discorso fatto per i primi SlackBuild.

L'ordine dovrebbe essere
1) Allegro
2) dzcomm
3) scantool

Avatar utente
darkstaring
Linux 3.x
Linux 3.x
Messaggi: 657
Iscritto il: mer 13 ott 2010, 13:55
Nome Cognome: Francesco Achenza
Desktop: KDE
Distribuzione: Arch Linux
Contatta:

Re: ELM 327 e Slackware

Messaggio da darkstaring »

grande atomixxx :)
Cesss ho visto ora
Grazie
non ho tempo per testare adesso ma faccio sapere come riesco :)

Bellllaaaaa!!!!

Avatar utente
darkstaring
Linux 3.x
Linux 3.x
Messaggi: 657
Iscritto il: mer 13 ott 2010, 13:55
Nome Cognome: Francesco Achenza
Desktop: KDE
Distribuzione: Arch Linux
Contatta:

Re: ELM 327 e Slackware

Messaggio da darkstaring »

Non riesco a compilare dzcom, ho installato allegro-5.0.2.1-i486-1sl dal repo di slacky
ma la configurazione di dzcom arresta così:

Codice: Seleziona tutto

gcc -DHAVE_CONFIG_H -Iinclude -I./include -I.   -DDZCOMM_ALLEGRO_AVAIL_PROGS -DDZCOMM_ALLEGRO_AVAIL -O3 -ffast-math -fomit-frame-pointer -Wall -c ./tests/rs232.c -o obj/unix/rs232.o
./tests/rs232.c:14:21: fatal error: allegro.h: No such file or directory
compilation terminated.
make: *** [obj/unix/rs232.o] Error 1

hashbang
Packager
Packager
Messaggi: 2021
Iscritto il: ven 4 giu 2010, 10:27
Nome Cognome: Luca De Pandis
Distribuzione: macOS/OpenBSD
Località: Lecce/Bergamo

Re: ELM 327 e Slackware

Messaggio da hashbang »

C'è un problema riguardo le istruzioni al preprocessore.

Il sorgente vanilla linka

Codice: Seleziona tutto

#include <allegro.h>
andando quindi a pescare una libreria inesistente in /usr/include.
La libreria, infatti, si trova in /usr/include/allegro5

Ho creato, quindi, una patch che dovrebbe risolvere il problema.

allegro-fix.patch

Codice: Seleziona tutto

--- a/tests/rs232.c	2002-04-03 12:59:06.000000000 +0200
+++ b/tests/rs232.c	2012-01-31 14:09:11.000000000 +0100
@@ -11,7 +11,7 @@
 
 #include <stdio.h>
 #ifdef DZCOMM_ALLEGRO_AVAIL_PROGS
-#include <allegro.h>
+#include <allegro5/allegro.h>
 #endif
 #include <dzcomm.h>
 
Inseriscila nello SlackBuild, subito prima del make, scrivendo

Codice: Seleziona tutto

patch -p1 -i $CWD/allegro-fix.patch

hashbang
Packager
Packager
Messaggi: 2021
Iscritto il: ven 4 giu 2010, 10:27
Nome Cognome: Luca De Pandis
Distribuzione: macOS/OpenBSD
Località: Lecce/Bergamo

Re: ELM 327 e Slackware

Messaggio da hashbang »

Ora che guardo il configure, però, mi accorgo anche di un'altra possibile soluzione (meno invasiva):

Codice: Seleziona tutto

./configure --with-allegroincpath=/usr/include/allegro5
Se passi questo parametro al configure, nello SlackBuild, dovresti risolvere senza applicare la patch.

Avatar utente
darkstaring
Linux 3.x
Linux 3.x
Messaggi: 657
Iscritto il: mer 13 ott 2010, 13:55
Nome Cognome: Francesco Achenza
Desktop: KDE
Distribuzione: Arch Linux
Contatta:

Re: ELM 327 e Slackware

Messaggio da darkstaring »

ok, e bastato aggiungere "--with-allegroincpath" come mi hai detto tu :)...dzcom è pacchettizzato e installato...
ora stavo provando a pacchettizzare scantool ma sembra non accetti la patch:

Codice: Seleziona tutto

root@:scantool$ sh scantool_net.SlackBuild
Archive:  /home/francesco/Scantool/scantool/scantool_net113src.zip
  inflating: about.c                 
  inflating: about.h                 
  inflating: codes.dat               
  inflating: custom_gui.c            
  inflating: custom_gui.h            
  inflating: datafile.h              
  inflating: error_handlers.c        
  inflating: error_handlers.h        
  inflating: globals.h               
  inflating: gpl.txt                 
  inflating: main.c                  
  inflating: main_menu.c             
  inflating: main_menu.h             
  inflating: makefile                
  inflating: options.c               
  inflating: options.h               
  inflating: readme.txt              
  inflating: resource.h              
  inflating: scantool.dat            
  inflating: ScanTool.dev            
  inflating: scantool.h              
  inflating: scantool.ico            
  inflating: scantool.rc             
  inflating: sensors.c               
  inflating: sensors.h               
  inflating: serial.c                
  inflating: serial.h                
 extracting: todo.txt                
  inflating: trouble_code_reader.c   
  inflating: trouble_code_reader.h   
  inflating: version.h               
patching file makefile
Hunk #1 FAILED at 40.
1 out of 1 hunk FAILED -- saving rejects to file makefile.rej

hashbang
Packager
Packager
Messaggi: 2021
Iscritto il: ven 4 giu 2010, 10:27
Nome Cognome: Luca De Pandis
Distribuzione: macOS/OpenBSD
Località: Lecce/Bergamo

Re: ELM 327 e Slackware

Messaggio da hashbang »

Mmh...strano :-k

Anche a me da lo stesso problema.

A quanto pare sembra che la patch dia errore se la prendo dal topic. Probabilmente c'è un problema quando la posto qui.
L'ho uploadata come allegato
unix-binary.patch.gz

Avatar utente
Ansa89
Iper Master
Iper Master
Messaggi: 2703
Iscritto il: mer 29 ago 2007, 17:57
Nome Cognome: Stefano Ansaloni
Slackware: 14.2 64bit
Kernel: 4.9.61
Desktop: XFCE 4.12
Località: Modena

Re: ELM 327 e Slackware

Messaggio da Ansa89 »

Se fai copia/incolla dal tag "code", ottieni una patch senza i caratteri di tabulazione, quindi genera un errore.

Avatar utente
darkstaring
Linux 3.x
Linux 3.x
Messaggi: 657
Iscritto il: mer 13 ott 2010, 13:55
Nome Cognome: Francesco Achenza
Desktop: KDE
Distribuzione: Arch Linux
Contatta:

Re: ELM 327 e Slackware

Messaggio da darkstaring »

Ora la patch viene accettata però si ferma quì:

Codice: Seleziona tutto

root@:scantool$ sh scantool_net.SlackBuild
Archive:  /home/francesco/Scantool/scantool/scantool_net113src.zip
  inflating: about.c                 
  inflating: about.h                 
  inflating: codes.dat               
  inflating: custom_gui.c            
  inflating: custom_gui.h            
  inflating: datafile.h              
  inflating: error_handlers.c        
  inflating: error_handlers.h        
  inflating: globals.h               
  inflating: gpl.txt                 
  inflating: main.c                  
  inflating: main_menu.c             
  inflating: main_menu.h             
  inflating: makefile                
  inflating: options.c               
  inflating: options.h               
  inflating: readme.txt              
  inflating: resource.h              
  inflating: scantool.dat            
  inflating: ScanTool.dev            
  inflating: scantool.h              
  inflating: scantool.ico            
  inflating: scantool.rc             
  inflating: sensors.c               
  inflating: sensors.h               
  inflating: serial.c                
  inflating: serial.h                
 extracting: todo.txt                
  inflating: trouble_code_reader.c   
  inflating: trouble_code_reader.h   
  inflating: version.h               
patching file makefile
gcc -O -Wall -Werror -c main.c
In file included from main.c:22:0:
globals.h:57:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
main.c: In function 'init':
main.c:74:4: error: 'datafile' undeclared (first use in this function)
main.c:74:4: note: each undeclared identifier is reported only once for each function it appears in
cc1: warnings being treated as errors
main.c:78:4: error: implicit declaration of function 'set_uformat'
main.c:78:16: error: 'U_ASCII' undeclared (first use in this function)
main.c:82:4: error: implicit declaration of function 'allegro_init'
main.c:85:4: error: implicit declaration of function 'set_window_title'
main.c:88:4: error: implicit declaration of function 'install_timer'
main.c:95:4: error: implicit declaration of function 'install_keyboard'
main.c:98:4: error: implicit declaration of function 'install_mouse'
main.c:103:4: error: implicit declaration of function 'set_config_file'
main.c:106:4: error: implicit declaration of function 'get_config_string'
main.c:106:4: error: passing argument 1 of 'strlen' makes pointer from integer without a cast
/usr/include/string.h:399:15: note: expected 'const char *' but argument is of type 'int'
main.c:106:4: error: passing argument 1 of '__builtin_strcmp' makes pointer from integer without a cast
main.c:106:4: note: expected 'const char *' but argument is of type 'int'
main.c:106:4: error: passing argument 1 of 'strlen' makes pointer from integer without a cast
/usr/include/string.h:399:15: note: expected 'const char *' but argument is of type 'int'
main.c:106:4: error: passing argument 1 of '__builtin_strcmp' makes pointer from integer without a cast
main.c:106:4: note: expected 'const char *' but argument is of type 'int'
main.c:106:4: error: passing argument 1 of '__builtin_strcmp' makes pointer from integer without a cast
main.c:106:4: note: expected 'const char *' but argument is of type 'int'
main.c:106:4: error: passing argument 1 of '__builtin_strcmp' makes pointer from integer without a cast
main.c:106:4: note: expected 'const char *' but argument is of type 'int'
main.c:111:7: error: implicit declaration of function 'set_config_string'
main.c:119:4: error: implicit declaration of function 'set_gfx_mode'
main.c:119:21: error: 'GFX_AUTODETECT_WINDOWED' undeclared (first use in this function)
main.c:127:17: error: 'allegro_error' undeclared (first use in this function)
main.c:133:24: error: 'GFX_AUTODETECT_FULLSCREEN' undeclared (first use in this function)
main.c:154:4: error: implicit declaration of function 'packfile_password'
main.c:155:4: error: implicit declaration of function 'load_datafile'
main.c:165:4: error: implicit declaration of function 'set_pallete'
main.c:166:4: error: 'font' undeclared (first use in this function)
main.c:167:4: error: 'gui_fg_color' undeclared (first use in this function)
main.c:168:4: error: 'gui_bg_color' undeclared (first use in this function)
main.c:169:4: error: 'gui_mg_color' undeclared (first use in this function)
main.c:170:4: error: implicit declaration of function 'set_mouse_sprite'
main.c: In function 'shut_down':
main.c:200:4: error: implicit declaration of function 'flush_config_file'
main.c:205:4: error: implicit declaration of function 'unload_datafile'
main.c:205:20: error: 'datafile' undeclared (first use in this function)
main.c:208:4: error: implicit declaration of function 'allegro_exit'
main.c: At top level:
main.c:246:1: error: return type defaults to 'int'
main.c: In function 'END_OF_MAIN':
main.c:246:1: error: expected '{' at end of input
main.c:246:1: error: control reaches end of non-void function
make: *** [main.o] Error 1
:x

Rispondi