madmonkey1907 / hakchi

GNU General Public License v3.0
144 stars 36 forks source link

Can't compile on macOS: make: *** No rule to make target `3rdparty/macdylibbundler/*', needed by `build/macdylibbundler'. Stop. #16

Closed potyl closed 6 years ago

potyl commented 7 years ago

The macOS build is now broken. The instructions in the README are not valid and make returns:

Setting version information: v1.4.2-30-g1e219c0

clang -std=c99 -Wall -Wextra -Wno-unused-result -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE -D_DEFAULT_SOURCE -Iinclude/  `pkg-config --cflags libusb-1.0`  -o sunxi-fel fel.c progress.c soc_info.c fel_lib.c  `pkg-config --libs libusb-1.0`
make -C libmincrypt
gcc -o dsa_sig.o -ffunction-sections -O3 -c dsa_sig.c -I..
gcc -o p256.o -ffunction-sections -O3 -c p256.c -I..
gcc -o p256_ec.o -ffunction-sections -O3 -c p256_ec.c -I..
gcc -o p256_ecdsa.o -ffunction-sections -O3 -c p256_ecdsa.c -I..
gcc -o rsa.o -ffunction-sections -O3 -c rsa.c -I..
gcc -o sha.o -ffunction-sections -O3 -c sha.c -I..
gcc -o sha256.o -ffunction-sections -O3 -c sha256.c -I..
ar rc libmincrypt.a dsa_sig.o p256.o p256_ec.o p256_ecdsa.o rsa.o sha.o sha256.o
cp libmincrypt.a ..
gcc -o mkbootimg.o -ffunction-sections -O3 -c mkbootimg.c -I. -Werror
gcc -o mkbootimg mkbootimg.o -L. -lmincrypt -Wl,-dead_strip -s
ld: warning: option -s is obsolete and being ignored
gcc -o unpackbootimg.o -ffunction-sections -O3 -c unpackbootimg.c -Werror
gcc -o unpackbootimg unpackbootimg.o -Wl,-dead_strip -s
ld: warning: option -s is obsolete and being ignored
Info: creating stash file /Users/erodriguez/Projects/hakchi/build/.qmake.stash
make: *** No rule to make target `3rdparty/macdylibbundler/*', needed by `build/macdylibbundler'.  Stop.
potyl commented 7 years ago

@thomas-alrek Are you able to compile on macOS? If so can you update the makefile or the readme?

potyl commented 7 years ago

Ok I see a new supmodule was added so I needed to do:

git submodule init
git submodule update
potyl commented 7 years ago

Compilation is broken further down with the following error:

c++ -o ./dylibbundler ./Settings.o ./DylibBundler.o ./Dependency.o ./main.o ./Utils.o
/usr/local/Cellar/qt5/5.7.1_1/bin/uic ../hakchi-gui/src/mainwindow.ui -o ui_mainwindow.h
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -c -pipe -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.8 -I/usr/local/Cellar/libusb/1.0.20/include/libusb-1.0 -std=gnu99 -DNDEBUG -Wall -Wextra -Wno-error -O2 -Wall -W -fPIC -DQT_NO_DEBUG -DQT_PLUGIN -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../hakchi-gui -I. -I../3rdparty/sunxi-tools -I../3rdparty/sunxi-tools/include -I../3rdparty/mkbootimg -I/usr/local/Cellar/qt5/5.7.1_1/lib/QtWidgets.framework/Headers -I/usr/local/Cellar/qt5/5.7.1_1/lib/QtGui.framework/Headers -I/usr/local/Cellar/qt5/5.7.1_1/lib/QtCore.framework/Headers -I. -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/AGL.framework/Headers -I. -I/usr/local/Cellar/qt5/5.7.1_1/mkspecs/macx-clang -F/usr/local/Cellar/qt5/5.7.1_1/lib -o fel_lib.o ../3rdparty/sunxi-tools/fel_lib.c
../3rdparty/sunxi-tools/fel_lib.c:65:3: error: void function 'no_usb_error' should not return a value [-Wreturn-type]
                exit(exitcode);
                ^~~~~~~~~~~~~~
../3rdparty/sunxi-tools/fel_lib.c:49:29: note: expanded from macro 'exit'
#define exit(x) {no_exit(x);return 0;}
                            ^      ~
../3rdparty/sunxi-tools/fel_lib.c:98:4: error: void function 'usb_bulk_send' should not return a value [-Wreturn-type]
                        usb_error(rc, "usb_bulk_send()", 2);
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../3rdparty/sunxi-tools/fel_lib.c:67:55: note: expanded from macro 'usb_error'
#define usb_error(x,y,z) {no_usb_error(x,y,z);if(z!=0)return 0;}
                                                      ^      ~
../3rdparty/sunxi-tools/fel_lib.c:114:4: error: void function 'usb_bulk_recv' should not return a value [-Wreturn-type]
                        usb_error(rc, "usb_bulk_recv()", 2);
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../3rdparty/sunxi-tools/fel_lib.c:67:55: note: expanded from macro 'usb_error'
#define usb_error(x,y,z) {no_usb_error(x,y,z);if(z!=0)return 0;}
                                                      ^      ~
../3rdparty/sunxi-tools/fel_lib.c:499:3: error: void function 'feldev_claim' should not return a value [-Wreturn-type]
                usb_error(rc, "libusb_claim_interface()", 1);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../3rdparty/sunxi-tools/fel_lib.c:67:55: note: expanded from macro 'usb_error'
#define usb_error(x,y,z) {no_usb_error(x,y,z);if(z!=0)return 0;}
                                                      ^      ~
../3rdparty/sunxi-tools/fel_lib.c:503:3: error: void function 'feldev_claim' should not return a value [-Wreturn-type]
                usb_error(rc, "FAILED to get FEL mode endpoint addresses!", 1);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../3rdparty/sunxi-tools/fel_lib.c:67:55: note: expanded from macro 'usb_error'
#define usb_error(x,y,z) {no_usb_error(x,y,z);if(z!=0)return 0;}
                                                      ^      ~
../3rdparty/sunxi-tools/fel_lib.c:615:3: error: void function 'feldev_init' should not return a value [-Wreturn-type]
                usb_error(rc, "libusb_init()", 1);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../3rdparty/sunxi-tools/fel_lib.c:67:55: note: expanded from macro 'usb_error'
#define usb_error(x,y,z) {no_usb_error(x,y,z);if(z!=0)return 0;}
                                                      ^      ~
6 errors generated.
make[1]: *** [fel_lib.o] Error 1
make: *** [build/hakchi-gui] Error 2
madmonkey1907 commented 7 years ago

try to add -Wno-return-type at line 13 in the *.pro file (QMAKE_CFLAGS). this whole thing is a kludge of course, but hey, it works. apparently not everywhere though.

luizfilipe commented 7 years ago

I'm getting this error below, Anyone has any clue on how to fix it?

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -headerpad_max_install_names -stdlib=libc++ -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.8 -o hakchi-gui.app/Contents/MacOS/hakchi-gui fel_lib.o soc_info.o progress.o fel.o main.o mainwindow.o wincon.o worker.o md5int.o moc_fel.o moc_mainwindow.o moc_wincon.o moc_worker.o   -F/usr/local/Cellar/qt5/5.7.1_1/lib -L/usr/local/Cellar/libusb/1.0.21/lib -lusb-1.0 -framework QtWidgets -framework QtGui -framework QtCore -framework DiskArbitration -framework IOKit -framework OpenGL -framework AGL 
Undefined symbols for architecture x86_64:
  "_CFAutorelease", referenced from:
      appPath() in main.o
  "_CFBundleCopyBundleURL", referenced from:
      appPath() in main.o
  "_CFBundleGetMainBundle", referenced from:
      appPath() in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [hakchi-gui.app/Contents/MacOS/hakchi-gui] Error 1
make: *** [build/hakchi-gui] Error 2
santteegt commented 7 years ago

@luizfilipe did you find how to solve this issue?

luizfilipe commented 7 years ago

No @santtegt.

hjelmn commented 7 years ago

The project is missing -framework CoreFoundation. I was able to get it to build by adding it to the end of the framework list in build/Makefile. Not perfect but it does get the job done. The problem is the app fails due to the missing data directory. Not sure why it isn't part of the repository.

madmonkey1907 commented 7 years ago

because it's binary. you can compile it following directions in r16-uboot subdirectory, or just grab it from win32 release.

toasteez commented 7 years ago

Is this the NES tool and will it work with Mac if compiled correctly?

madmonkey1907 commented 7 years ago

Is this the NES tool

what you mean?

will it work with Mac if compiled correctly?

it should, but so far no one compiled it correctly. I don't have a mac.