Closed twoerner closed 7 years ago
eddie@eddie-pc-linux /tmp/rkdeveloptool $ autoreconf -i
configure.ac:12: installing 'cfg/compile'
configure.ac:7: installing 'cfg/install-sh'
configure.ac:7: installing 'cfg/missing'
Makefile.am: installing 'cfg/depcomp'
eddie@eddie-pc-linux /tmp/rkdeveloptool $ sudo apt-cache search autoreconf
[sudo] password for eddie:
dh-autoreconf - debhelper add-on to call autoreconf and clean up after the build
dh-dist-zilla - debhelper add-on to call dzil build and clean up after the build
eddie@eddie-pc-linux /tmp/rkdeveloptool $ sudo apt-get install dh-autoreconf
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
将会同时安装下列软件:
autopoint debhelper dh-strip-nondeterminism libfile-stripnondeterminism-perl libtool po-debconf
建议安装:
dh-make libtool-doc gfortran | fortran95-compiler gcj-jdk libmail-box-perl
推荐安装:
libltdl-dev libmail-sendmail-perl
下列【新】软件包将被安装:
autopoint debhelper dh-autoreconf dh-strip-nondeterminism libfile-stripnondeterminism-perl libtool po-debconf
升级了 0 个软件包,新安装了 7 个软件包,要卸载 0 个软件包,有 611 个软件包未被升级。
需要下载 1,607 kB 的归档。
解压缩后会消耗 3,247 kB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 autopoint all 0.19.7-2ubuntu3 [406 kB]
获取:2 http://archive.ubuntu.com/ubuntu xenial/main amd64 libtool all 2.4.6-0.1 [193 kB]
获取:3 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 dh-autoreconf all 12~ubuntu16.04.1 [15.7 kB]
获取:4 http://archive.ubuntu.com/ubuntu xenial/main amd64 libfile-stripnondeterminism-perl all 0.015-1 [10.3 kB]
获取:5 http://archive.ubuntu.com/ubuntu xenial/main amd64 dh-strip-nondeterminism all 0.015-1 [4,864 B]
获取:6 http://archive.ubuntu.com/ubuntu xenial/main amd64 po-debconf all 1.0.19 [234 kB]
获取:7 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 debhelper all 10.2.2ubuntu1~ubuntu16.04.1 [743 kB]
已下载 1,607 kB,耗时 14秒 (112 kB/s)
正在选中未选择的软件包 autopoint。
(正在读取数据库 ... 系统当前共安装有 247145 个文件和目录。)
正准备解包 .../autopoint_0.19.7-2ubuntu3_all.deb ...
正在解包 autopoint (0.19.7-2ubuntu3) ...
正在选中未选择的软件包 libtool。
正准备解包 .../libtool_2.4.6-0.1_all.deb ...
正在解包 libtool (2.4.6-0.1) ...
正在选中未选择的软件包 dh-autoreconf。
正准备解包 .../dh-autoreconf_12~ubuntu16.04.1_all.deb ...
正在解包 dh-autoreconf (12~ubuntu16.04.1) ...
正在选中未选择的软件包 libfile-stripnondeterminism-perl。
正准备解包 .../libfile-stripnondeterminism-perl_0.015-1_all.deb ...
正在解包 libfile-stripnondeterminism-perl (0.015-1) ...
正在选中未选择的软件包 dh-strip-nondeterminism。
正准备解包 .../dh-strip-nondeterminism_0.015-1_all.deb ...
正在解包 dh-strip-nondeterminism (0.015-1) ...
正在选中未选择的软件包 po-debconf。
正准备解包 .../po-debconf_1.0.19_all.deb ...
正在解包 po-debconf (1.0.19) ...
正在选中未选择的软件包 debhelper。
正准备解包 .../debhelper_10.2.2ubuntu1~ubuntu16.04.1_all.deb ...
正在解包 debhelper (10.2.2ubuntu1~ubuntu16.04.1) ...
正在处理用于 man-db (2.7.5-1) 的触发器 ...
正在处理用于 doc-base (0.10.7) 的触发器 ...
Processing 1 added doc-base file...
Registering documents with scrollkeeper...
正在设置 autopoint (0.19.7-2ubuntu3) ...
正在设置 libtool (2.4.6-0.1) ...
正在设置 libfile-stripnondeterminism-perl (0.015-1) ...
正在设置 po-debconf (1.0.19) ...
正在设置 dh-autoreconf (12~ubuntu16.04.1) ...
正在设置 debhelper (10.2.2ubuntu1~ubuntu16.04.1) ...
正在设置 dh-strip-nondeterminism (0.015-1) ...
eddie@eddie-pc-linux /tmp/rkdeveloptool $ autoreconf -i
eddie@eddie-pc-linux /tmp/rkdeveloptool $ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
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 ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
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 whether make sets $(MAKE)... (cached) yes
checking whether ln -s works... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBUSB1... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating cfg/Makefile
config.status: creating cfg/config.h
config.status: executing depfiles commands
eddie@eddie-pc-linux /tmp/rkdeveloptool $ make
make[1]: Entering directory '/tmp/rkdeveloptool'
g++ -DHAVE_CONFIG_H -I. -I./cfg -Wall -Werror -Wextra -Wreturn-type -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -I/usr/include/libusb-1.0 -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.cpp
mv -f .deps/main.Tpo .deps/main.Po
g++ -DHAVE_CONFIG_H -I. -I./cfg -Wall -Werror -Wextra -Wreturn-type -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -I/usr/include/libusb-1.0 -g -O2 -MT crc.o -MD -MP -MF .deps/crc.Tpo -c -o crc.o crc.cpp
mv -f .deps/crc.Tpo .deps/crc.Po
g++ -DHAVE_CONFIG_H -I. -I./cfg -Wall -Werror -Wextra -Wreturn-type -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -I/usr/include/libusb-1.0 -g -O2 -MT RKBoot.o -MD -MP -MF .deps/RKBoot.Tpo -c -o RKBoot.o RKBoot.cpp
mv -f .deps/RKBoot.Tpo .deps/RKBoot.Po
g++ -DHAVE_CONFIG_H -I. -I./cfg -Wall -Werror -Wextra -Wreturn-type -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -I/usr/include/libusb-1.0 -g -O2 -MT RKComm.o -MD -MP -MF .deps/RKComm.Tpo -c -o RKComm.o RKComm.cpp
mv -f .deps/RKComm.Tpo .deps/RKComm.Po
g++ -DHAVE_CONFIG_H -I. -I./cfg -Wall -Werror -Wextra -Wreturn-type -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -I/usr/include/libusb-1.0 -g -O2 -MT RKDevice.o -MD -MP -MF .deps/RKDevice.Tpo -c -o RKDevice.o RKDevice.cpp
mv -f .deps/RKDevice.Tpo .deps/RKDevice.Po
g++ -DHAVE_CONFIG_H -I. -I./cfg -Wall -Werror -Wextra -Wreturn-type -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -I/usr/include/libusb-1.0 -g -O2 -MT RKImage.o -MD -MP -MF .deps/RKImage.Tpo -c -o RKImage.o RKImage.cpp
mv -f .deps/RKImage.Tpo .deps/RKImage.Po
g++ -DHAVE_CONFIG_H -I. -I./cfg -Wall -Werror -Wextra -Wreturn-type -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -I/usr/include/libusb-1.0 -g -O2 -MT RKLog.o -MD -MP -MF .deps/RKLog.Tpo -c -o RKLog.o RKLog.cpp
mv -f .deps/RKLog.Tpo .deps/RKLog.Po
g++ -DHAVE_CONFIG_H -I. -I./cfg -Wall -Werror -Wextra -Wreturn-type -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -I/usr/include/libusb-1.0 -g -O2 -MT RKScan.o -MD -MP -MF .deps/RKScan.Tpo -c -o RKScan.o RKScan.cpp
mv -f .deps/RKScan.Tpo .deps/RKScan.Po
g++ -g -O2 -lusb-1.0 -o rkdeveloptool main.o crc.o RKBoot.o RKComm.o RKDevice.o RKImage.o RKLog.o RKScan.o
main.o: In function main': /tmp/rkdeveloptool/main.cpp:907: undefined reference to
libusb_init'
/tmp/rkdeveloptool/main.cpp:935: undefined reference to libusb_exit' RKComm.o: In function
CRKUsbComm::Reset_Usb_Device()':
/tmp/rkdeveloptool/RKComm.cpp:121: undefined reference to libusb_reset_device' RKComm.o: In function
CRKUsbComm::RKU_Read(unsigned char, unsigned int)':
/tmp/rkdeveloptool/RKComm.cpp:130: undefined reference to libusb_bulk_transfer' RKComm.o: In function
CRKUsbComm::RKU_Write(unsigned char, unsigned int)':
/tmp/rkdeveloptool/RKComm.cpp:150: undefined reference to libusb_bulk_transfer' RKComm.o: In function
CRKUsbComm::RKU_DeviceRequest(unsigned int, unsigned char, unsigned int)':
/tmp/rkdeveloptool/RKComm.cpp:682: undefined reference to libusb_control_transfer' /tmp/rkdeveloptool/RKComm.cpp:695: undefined reference to
libusb_control_transfer'
RKComm.o: In function CRKUsbComm::InitializeUsb(_STRUCT_RKDEVICE_DESC)': /tmp/rkdeveloptool/RKComm.cpp:40: undefined reference to
libusb_open'
/tmp/rkdeveloptool/RKComm.cpp:48: undefined reference to libusb_get_active_config_descriptor' /tmp/rkdeveloptool/RKComm.cpp:84: undefined reference to
libusb_free_config_descriptor'
/tmp/rkdeveloptool/RKComm.cpp:85: undefined reference to libusb_claim_interface' /tmp/rkdeveloptool/RKComm.cpp:97: undefined reference to
libusb_free_config_descriptor'
RKComm.o: In function CRKUsbComm::UninitializeUsb()': /tmp/rkdeveloptool/RKComm.cpp:103: undefined reference to
libusb_close'
RKComm.o: In function `CRKUsbComm::RKU_Read_EX(unsigned char, unsigned int)':
/tmp/rkdeveloptool/RKComm.cpp:266: undefined reference to libusb_bulk_transfer' RKScan.o: In function
CRKScan::EnumerateUsbDevice(std::cxx11::list<_STRUCT_RKDEVICE_DESC, std::allocator<_STRUCT_RKDEVICE_DESC> >&, unsigned int&)':
/tmp/rkdeveloptool/RKScan.cpp:232: undefined reference to libusb_get_device_list' /tmp/rkdeveloptool/RKScan.cpp:242: undefined reference to
libusb_get_device_descriptor'
/tmp/rkdeveloptool/RKScan.cpp:255: undefined reference to libusb_get_bus_number' /tmp/rkdeveloptool/RKScan.cpp:257: undefined reference to
libusb_get_port_number'
/tmp/rkdeveloptool/RKScan.cpp:258: undefined reference to libusb_ref_device' /tmp/rkdeveloptool/RKScan.cpp:264: undefined reference to
libusb_free_device_list'
/tmp/rkdeveloptool/RKScan.cpp:244: undefined reference to libusb_free_device_list' RKScan.o: In function
CRKScan::FreeDeviceList(std::cxx11::list<_STRUCT_RKDEVICE_DESC, std::allocator<_STRUCT_RKDEVICE_DESC> >&)':
/tmp/rkdeveloptool/RKScan.cpp:273: undefined reference to libusb_unref_device' RKScan.o: In function
CRKScan::Search(unsigned int)':
/tmp/rkdeveloptool/RKScan.cpp:332: undefined reference to libusb_unref_device' /tmp/rkdeveloptool/RKScan.cpp:316: undefined reference to
libusb_unref_device'
/tmp/rkdeveloptool/RKScan.cpp:351: undefined reference to libusb_unref_device' /tmp/rkdeveloptool/RKScan.cpp:370: undefined reference to
libusb_unref_device'
RKScan.o: In function CRKScan::Wait(_STRUCT_RKDEVICE_DESC&, ENUM_RKUSB_TYPE, unsigned short, unsigned short)': /tmp/rkdeveloptool/RKScan.cpp:543: undefined reference to
libusb_ref_device'
collect2: error: ld returned 1 exit status
Makefile:432: recipe for target 'rkdeveloptool' failed
make[1]: [rkdeveloptool] Error 1
make[1]: Leaving directory '/tmp/rkdeveloptool'
Makefile:471: recipe for target 'all-recursive' failed
make: [all-recursive] Error 1
eddie@eddie-pc-linux /tmp/rkdeveloptool $ uname -a
Linux eddie-pc-linux 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
eddie@eddie-pc-linux /tmp/rkdeveloptool $ lsb
lsblk lsb_release
eddie@eddie-pc-linux /tmp/rkdeveloptool $ lsb
lsblk lsb_release
eddie@eddie-pc-linux /tmp/rkdeveloptool $ lsb_release
No LSB modules are available.
eddie@eddie-pc-linux /tmp/rkdeveloptool $ lsb_release -a
No LSB modules are available.
Distributor ID: LinuxMint
Description: Linux Mint 18 Sarah
Release: 18
Codename: sarah
I've found my mistake. I installed Mint to a VM, tested, and reproduced what you were seeing. I'm going to cancel this merge request and open a new one with the fix (which I also tested in Mint as well as my own machine, openSUSE).
I was curious about the linking part of your Makefile, now I know why you have it that way :-)
Could you possibly let me know the Linux distribution you're working with and which version?
Also, could you please cut&paste the steps you're performing and the errors you're getting as a result?
Thanks!