Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error on Fedora 27 #47

Open
jjmakin opened this issue Mar 4, 2018 · 5 comments
Open

Build error on Fedora 27 #47

jjmakin opened this issue Mar 4, 2018 · 5 comments

Comments

@jjmakin
Copy link

jjmakin commented Mar 4, 2018

Hi, I'd like to offer help and request help for building on this popular linux distro.
Packages I have installed so far: cpio lzop wget qt-devel upx qt3-devel redhat-rpm-config libusbx-devel

I have a libusb.h error, which may be just an include path problem

gcc -c -pipe -std=gnu99 -DNDEBUG -Wall -Wextra -Wno-return-type -Wall -W -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fno-strict-aliasing -DQT_NO_DEBUG -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_THREAD_SUPPORT -I/usr/lib64/qt-3.3/mkspecs/default -I../hakchi-gui -I../3rdparty/sunxi-tools -I../3rdparty/sunxi-tools/include -I../3rdparty/mkbootimg -I/usr/lib64/qt-3.3/include -Isrc -I../hakchi-gui/src/ -I. -o fel_lib.o ../3rdparty/sunxi-tools/fel_lib.c
../3rdparty/sunxi-tools/fel_lib.c:26:10: fatal error: libusb.h: No such file or directory
#include <libusb.h>
^~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:159: fel_lib.o] Error 1
make[1]: Leaving directory '/home/jarrod/git/hakchi/build'
make: *** [Makefile:48: build/hakchi-gui] Error 2

libusbx provides /usr/include/libusb-1.0/libusb.h
I symlinked that into one of the include directories and got a little further, now I'm stuck with

gcc -c -pipe -std=gnu99 -DNDEBUG -Wall -Wextra -Wno-return-type -Wall -W -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fno-strict-aliasing -DQT_NO_DEBUG -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_THREAD_SUPPORT -I/usr/lib64/qt-3.3/mkspecs/default -I../hakchi-gui -I../3rdparty/sunxi-tools -I../3rdparty/sunxi-tools/include -I../3rdparty/mkbootimg -I/usr/lib64/qt-3.3/include -Isrc -I../hakchi-gui/src/ -I. -o soc_info.o ../3rdparty/sunxi-tools/soc_info.c
gcc -c -pipe -std=gnu99 -DNDEBUG -Wall -Wextra -Wno-return-type -Wall -W -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fno-strict-aliasing -DQT_NO_DEBUG -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_THREAD_SUPPORT -I/usr/lib64/qt-3.3/mkspecs/default -I../hakchi-gui -I../3rdparty/sunxi-tools -I../3rdparty/sunxi-tools/include -I../3rdparty/mkbootimg -I/usr/lib64/qt-3.3/include -Isrc -I../hakchi-gui/src/ -I. -o progress.o ../3rdparty/sunxi-tools/progress.c
g++ -c -pipe -std=gnu++11 -Wall -Wextra -Wall -W -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fno-strict-aliasing -DQT_NO_DEBUG -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_THREAD_SUPPORT -I/usr/lib64/qt-3.3/mkspecs/default -I../hakchi-gui -I../3rdparty/sunxi-tools -I../3rdparty/sunxi-tools/include -I../3rdparty/mkbootimg -I/usr/lib64/qt-3.3/include -Isrc -I../hakchi-gui/src/ -I. -o fel.o ../hakchi-gui/src/fel.cpp
In file included from ../hakchi-gui/src/fel.cpp:1:0:
../hakchi-gui/src/fel.h:6:10: fatal error: QObject: No such file or directory
#include
^~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:172: fel.o] Error 1
make[1]: Leaving directory '/home/jarrod/git/hakchi/build'
make: *** [Makefile:48: build/hakchi-gui] Error 2

This has something to do with qtmake commands, amongst other packages I could have installed were
mingw32-qt.noarch : Qt for Windows
mingw64-qt.noarch : Qt for Windows
but I really don't know what to do from here.

@madmonkey1907
Copy link
Owner

You're building rpm or just building? Rpm will not work as-is anyway currently, it's designed to run from repo directory. Worse, there is no recipe to build required arm binaries in the makefile. Do you have pkg-config installed? Output of pkg-config --libs "libusb-1.0 >= 1.0.0"?

@jjmakin
Copy link
Author

jjmakin commented Mar 7, 2018

$ pkg-config --libs "libusb-1.0 >= 1.0.0"
-lusb-1.0

@madmonkey1907
Copy link
Owner

try this
sudo dnf remove qt3-devel redhat-rpm-config mingw32-qt mingw64-qt
sudo dnf install libusbx-devel qt-devel upx cpio lzop wget xz
in repo
git clean -fdx
git submodule update --init --recursive
make
OR
PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig make

output of make if it doesn't build

@jjmakin
Copy link
Author

jjmakin commented Jan 23, 2019

Wow. I totally forgot I had made this.
A year later I'm trying on Fedora29

Here's my latest problem

sntool/sntool.cpp:106:13: note: here
case ' ':
^~~~
/usr/bin/ld: /tmp/cc8i3uvy.o: in function sunxi_flash_ioctl(unsigned int, unsigned int, unsigned int, _IO_FILE*)': sntool.cpp:(.text+0x1066): undefined reference to crc32'
/usr/bin/ld: sntool.cpp:(.text+0x10e3): undefined reference to `crc32'
collect2: error: ld returned 1 exit status
make: *** [Makefile:62: bin/sntool] Error 1

@jjmakin
Copy link
Author

jjmakin commented Jan 23, 2019

I added the "-lz" flag suggested in another issue on here and I believe it has now built

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants