HaikuArchives / StreamRadio

Haiku-native application to search for and listen to internet radio stations.
8 stars 11 forks source link

Build is broken atm? #18

Closed Begasus closed 4 years ago

Begasus commented 4 years ago

When checking out with git and a build in Terminal I got the following error:

cat Radio.rdef | cc -E  -I./  -Iobjects.x86-cc2-release/ -I-  -I/boot/system/develop/headers/private/media  -I/boot/system/develop/headers/os/codec  -I/boot/system/develop/headers/private/media/experimental  -I/boot/system/develop/headers/private/shared  -I/boot/system/develop/headers/libxml2  -O3   -DHAIKU_TARGET_PLATFORM_HAIKU  - | grep -av '^#' | rc -I ./ -o "objects.x86-cc2-release/Radio.rsrc" -
echo "resource app_signature \"application/x-vnd.Fishpond-Radio\";" > StreamRadio-version.rdef
echo "resource app_version {" >> StreamRadio-version.rdef
echo "     major = 0, middle = 0, minor = 5," >> StreamRadio-version.rdef
echo "     variety = B_APPV_ALPHA, internal = 1," >> StreamRadio-version.rdef
echo "     short_info=\"StreamRadio\"," >> StreamRadio-version.rdef
echo "     long_info=\"StreamRadio v0.0.5-1, ©Fishpond 2017\"" >> StreamRadio-version.rdef
echo "};" >> StreamRadio-version.rdef
cat StreamRadio-version.rdef | cc -E  -I./  -Iobjects.x86-cc2-release/ -I-  -I/boot/system/develop/headers/private/media  -I/boot/system/develop/headers/os/codec  -I/boot/system/develop/headers/private/media/experimental  -I/boot/system/develop/headers/private/shared  -I/boot/system/develop/headers/libxml2  -O3   -DHAIKU_TARGET_PLATFORM_HAIKU  - | grep -av '^#' | rc -I ./ -o "objects.x86-cc2-release/StreamRadio-version.rsrc" -
cc -o "dist/StreamRadio"        objects.x86-cc2-release/About.o objects.x86-cc2-release/Expander.o objects.x86-cc2-release/HttpUtils.o objects.x86-cc2-release/MainWindow.o objects.x86-cc2-release/RadioApp.o objects.x86-cc2-release/RadioSettings.o objects.x86-cc2-release/Station.o objects.x86-cc2-release/StationFinder.o objects.x86-cc2-release/StationFinderListenLive.o objects.x86-cc2-release/StationFinderRadioNetwork.o objects.x86-cc2-release/StationListView.o objects.x86-cc2-release/StationPanel.o objects.x86-cc2-release/StreamIO.o objects.x86-cc2-release/StreamPlayer.o objects.x86-cc2-release/Utils.o  -Xlinker -soname=_APP_  -L./  -Lobjects.x86-cc2-release/    -lstdc++.r4  -lbe  -ltranslation  -lbnetapi  -lmedia  -lxml2  -llocalestub 
/packages/gcc-2.95.3_2017_07_20-2/.self/develop/tools/i586-pc-haiku/bin/ld: cannot open output file dist/StreamRadio: No such file or directory
collect2: ld returned 1 exit status
/boot/system/develop/etc/makefile-engine:246: recipe for target 'dist/StreamRadio' failed
make: *** [dist/StreamRadio] Error 1
Begasus commented 4 years ago

On gcc2h*

Begasus commented 4 years ago

Error is invoked here: https://github.com/HaikuArchives/Haiku-Radio/blob/master/Makefile#L17 Commenting it out fixes the build and things run ok (including Help in the menu)

Begasus commented 4 years ago

Creating "dist" directory prior to "make" works, but I think this should be done in the Makefile (something in the line of "mkdir -p $(TARGET_DIR)"?)

Vidrep commented 4 years ago

Old recipe is 0.0.3-14. New about box showing 0.0.5-1. I believe it should be 0.0.4-1 for recipe and in sources.

Begasus commented 4 years ago

Old recipe is 0.0.3-14. New about box showing 0.0.5-1. I believe it should be 0.0.4-1 for recipe and in sources.

https://github.com/HaikuArchives/StreamRadio/commit/f83736cf5b7546ca1ca62d619d8b769939282a9e#diff-b67911656ef5d18c4ae36cb6741b7965

humdingerb commented 4 years ago

Creating "dist" directory prior to "make" works, but I think this should be done in the Makefile (something in the line of "mkdir -p $(TARGET_DIR)"?)

Sounds good. I'm not a makefile expert, so I have no idea where in it is the right place to put the mkdir...

Begasus commented 4 years ago

Can't seem to pinpoint it too :( but seeing the Makefile it was there from the start?

jsteinaker commented 4 years ago

I've deleted the dist folder in my local branch to do some tests, and I've changed the .gitignore to ignore everything in the dist/ folder. All of this was done the other day, before comitting changes. Indeed, the Makefile was like that from the very beginning. So basically it seems like I've fucked up again. The "dist" folder used to be in the repo.

Nonetheless, If you start the build using the new recipe haikuporter will grab the sources, compile them and produce a perfectly working binary, packaged and everything. Somehow it's sorting this out. Which raises the question... shouldn't the Makefile be able to recreate the "dist" folder, specially considering that it's meant to hold binaries and so it shouldn't be checked on the repo?

jsteinaker commented 4 years ago

Ok, confirmed, there's a 'mkdir -p dist' on the recipe that does the magic for haikuporter. Probably the easiest thing to do it's to recreate the 'dist' folder on the git repo and forget about it. I've just read a little bit about Makefile and I don't really want to touch that thing.

Begasus commented 4 years ago

Ok, confirmed, there's a 'mkdir -p dist' on the recipe that does the magic for haikuporter. Probably the easiest thing to do it's to recreate the 'dist' folder on the git repo and forget about it. I've just read a little bit about Makefile and I don't really want to touch that thing.

Had been looking at how other Makefiles ue TARGET_DIR, but couldn't find an issue there (didn't check the builds in Terminal for them though), so yes, maybe adding the ./dist to the repo could solve the issue for creating it :+1:

Begasus commented 4 years ago

On a second note (maybe could use a new ticket?), creating the package with "make package" creates a hpkg package with the icon to it, don't think it should be?

humdingerb commented 4 years ago

I think the "package" function in the makefile should stay. If just as an example how to do that. :)