stm8flash icon indicating copy to clipboard operation
stm8flash copied to clipboard

not compiled in ubuntu 18.04

Open GavukaAlexandr opened this issue 6 years ago • 6 comments

sudo apt-get install pkg-config sudo apt-get install libusb-1.0-0-dev You need to change the path to the libusb in the stm8flash/pgm.h file on #include </usr/include/libusb-1.0/libusb.h>

GavukaAlexandr avatar May 13 '18 09:05 GavukaAlexandr

I guess we'd need a configure script or a full autotools setup to handle varying libusb locations portably.

Philipp

spth avatar Jun 26 '18 06:06 spth

Same problem on debian too, it's located at /usr/include/libusb-1.0/libusb.h

mrx23dot avatar Aug 23 '21 14:08 mrx23dot

same file location on ubuntu 20.04, but stm8flash compiles OK.

stefaandesmet2003 avatar Sep 27 '21 12:09 stefaandesmet2003

Debian 11 and Ubuntu 20.04 reporting. Package libusb-1.0-0-dev places the libusb.h in /usr/include/libusb-1.0/libusb.h in both distros. stm8flash compiled successfully after installing pkg-config.

$ make
cc -g -O0 -DDEBUG=0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o stlink.o stlink.c
cc -g -O0 -DDEBUG=0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o stlinkv2.o stlinkv2.c
cc -g -O0 -DDEBUG=0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o espstlink.o espstlink.c
cc -g -O0 -DDEBUG=0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o main.o main.c
cc -g -O0 -DDEBUG=0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o byte_utils.o byte_utils.c
cc -g -O0 -DDEBUG=0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o ihex.o ihex.c
cc -g -O0 -DDEBUG=0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o srec.o srec.c
cc -g -O0 -DDEBUG=0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o stm8.o stm8.c
cc -g -O0 -DDEBUG=0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o libespstlink.o libespstlink.c
cc -g -O0 -DDEBUG=0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`  stlink.o stlinkv2.o espstlink.o main.o byte_utils.o ihex.o srec.o stm8.o libespstlink.o `pkg-config --libs libusb-1.0` -o stm8flash
$ ./stm8flash -V
20170616-1.1

agentgoblin avatar Nov 16 '21 16:11 agentgoblin

I guess we'd need a configure script or a full autotools setup to handle varying libusb locations portably.

pkg-config does it.

agentgoblin avatar Nov 16 '21 16:11 agentgoblin

For me (Debian GNJ/Linux testing) it always worked fine via the pkg-config in the Makefile.

spth avatar Nov 17 '21 09:11 spth