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

Numerous issues on Mac OS 11.2+ #301

Open
trvrplk opened this issue May 3, 2021 · 23 comments · May be fixed by #349
Open

Numerous issues on Mac OS 11.2+ #301

trvrplk opened this issue May 3, 2021 · 23 comments · May be fixed by #349

Comments

@trvrplk
Copy link

trvrplk commented May 3, 2021

I'm not really sure how exactly one would fix this, but when you try to run Skyscraper on Mac OS right now there are a number of issues. The first was a problem with Qt I solved by moving the path to Qt5 I installed through Homebrew to be first in $PATH. After I did that, though, I needed to reinstall Skyscraper, but found the build kept failing.

After much research, I found making a few changes in the Makefile the update script generates fixed the issue. I first changed the compiler to GCC and G++ (installed with Homebrew) rather than Xcode and renamed VERSION to VERSION.txt (the latter tip I found after a crazy amount of Googling), and then ran make --ignore-errors clean, make -j$(nproc) || handle_error "build", and sudo make install || handle_error "install", and it worked fine.

This is all a pain in the ass to do and I don't expect any changes to be made to the script to account for these issues, but I figured it was worth opening an issue so it could at least be noted in the documentation.

@muldjord
Copy link
Owner

muldjord commented May 6, 2021

Hi, thank you for the report. But without bullet-point, detailed description of the changes, it's hard for me to document. I don't own a Mac, so basically I would just be copying whatever users tell me to. Not exactly an optimal scenario.

I will add a note about potential issues and link to this issue ticket. Hopefully that will at least point Mac users in the right direction.

@trvrplk
Copy link
Author

trvrplk commented May 6, 2021

That's pretty much what I was asking for, just so anyone having problems has somewhere to turn

@muzll0dr
Copy link

muzll0dr commented May 6, 2021

This worked for me for a fresh install on Big Sur, thanks to @trvrplk!! The only thing I didn't have to deal with was the Qt5 issue, since that was already working for me. (Have homebrew already installed, etc.)

Here's the exact steps I took: (This is basically what @trvrplk was saying, but a little more verbose on the file changes since I wasn't entirely sure what a couple steps were wanting.)

  • edit Makefile
  • change the CC and CXX entries to be /usr/bin/gcc and /usr/bin/g++ respectively
  • mv VERSION VERSION.txt
  • make --ignore-errors clean
  • make -j$(nproc) || handle_error "build"
  • sudo make install || handle_error "install"

@trvrplk
Copy link
Author

trvrplk commented May 6, 2021

yes, thanks for actually writing it down! I took hours trying to figure out what was wrong with Qt so by the time i fixed the makefile I was too exhausted to copy the actual commands

@Samington33
Copy link

Hello, I followed the above instructions, and things seemed to go okay — no obvious error messages. But there doesn't seem to be a .skyscraper folder present.

I'm actually attempting to install into a different folder, ~/retro gaming stuff/tools. Is that a bad idea?

I attempted to find the folder by selecting "Go > Go to Folder" and typing "~/Retro Gaming Stuff/Tools/.skyscraper".

The "skysource" folder is present in this directory.

I'd like to access this in order to change settings within "skyscraper.ini.

Does anyone have any suggestions?

Really appreciate any help offered.

@Samington33
Copy link

Okay so I found the folder, it was in my route directory.

However, the config.ini isn't present. Is there something I could be doing wrong?

@Samington33
Copy link

So got it figured out. Basically, after I ran Skyscraper for the first time, it generated all the necessary files.

@Clowser323
Copy link

* edit Makefile

Hi, can I ask you where is this makefile? If I search for "makefile" in the folder I don't get any results. I am very sorry if this is basic knowledge but I am not well versed in this kind of things (I created this account just for this question).

@Samington33
Copy link

Samington33 commented May 9, 2022 via email

@Clowser323
Copy link

image

this is what it's in my Skysource folder just cloned from the repo.

@Samington33
Copy link

Samington33 commented May 9, 2022 via email

@Clowser323
Copy link

Clowser323 commented May 9, 2022

Yes, I ran it. The problem is that while running the script I get this error
--- Building Skyscraper v.3.7.5 ---
make: *** No targets specified and no makefile found. Stop.
--- Failed to build Skyscraper v.3.7.5, exiting with code 2 ---

Which is what leads me to think the makefile is missing for some reason.

@Zorias23
Copy link

Ok I struggled with this crap for hours too. If you're using a mac, i can tell you easily how to get this damn thing to work. Change 2 lines in the makefile, someone before me mentioned what they are. In the directory, rename VERSION to VERSION.txt, i modified the update.sh file to the follow and it worked:

#!/bin/bash
{
LATEST=wget -q -O - "https://api.github.com/repos/muldjord/skyscraper/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'

if [ ! -f VERSION ]
then
echo "VERSION=0.0.0" > VERSION
fi
source VERSION

handle_error () {
local EXITCODE=$?
local ACTION=$1
rm --force VERSION
echo "--- Failed to $ACTION Skyscraper v.${LATEST}, exiting with code $EXITCODE ---"
exit $EXITCODE
}

## then
#echo "--- Fetching Skyscraper v.$LATEST ---"
#wget -N https://github.com/muldjord/skyscraper/archive/${LATEST}.tar.gz || handle_error "fetch"
echo "--- Unpacking ---"
tar xf skyscraper-3.7.5.tar.gz || handle_error "unpack"
#rm ${LATEST}.tar.gz
echo "--- Cleaning out old build if one exists ---"
mv VERSION VERSION.txt
make --ignore-errors clean
#rm --force .qmake.stash
#qmake || handle_error "clean old"
echo "--- Building Skyscraper v.$LATEST ---"
make -j$(nproc) || handle_error "build"
echo "--- Installing Skyscraper v.$LATEST ---"
sudo make install || handle_error "install"
echo "--- Skyscraper has been updated to v.$LATEST ---"

#else
#echo "--- Skyscraper is already the latest version, exiting ---"
#echo "You can force a reinstall by removing the VERSION file by running rm VERSION. Then rerun ./update_skyscraper.sh afterwards."
#fi
echo "You are done!!"
exit
}

run that sh file and you should be good!

@notoast76
Copy link

Hi, I've followed all instructions, and I don't seem to have a makefile. Running the update script doesn't seem to create so I'm a bit lost. Does anyone know how to generate this file?

@fallwith fallwith linked a pull request Sep 18, 2022 that will close this issue
@fallwith
Copy link

Hi all,

With macOS, I ran into all of the issues detailed here. Thanks for all of the great advice on workarounds. I put together a new version of the update script that aims to fix all of the problems for macOS without breaking anything under Linux.

I've submitted PR #349 which explains the root cause of all issues and what was done to fix them.

In the meantime, if I simply change the README instructions to use my fork, everything works for me. Here is the complete list of steps I followed (NOTE the use of my "fallwith" fork in the url given to wget).

$ brew install wget
$ brew install qt5
$ brew link qt5 --force
$ mkdir skysource
$ cd skysource
$ wget -q -O - https://raw.githubusercontent.com/fallwith/skyscraper/make_update_script_work_on_mac/update_skyscraper.sh | bash

@notoast76
Copy link

Hi all,

With macOS, I ran into all of the issues detailed here. Thanks for all of the great advice on workarounds. I put together a new version of the update script that aims to fix all of the problems for macOS without breaking anything under Linux.

I've submitted PR #349 which explains the root cause of all issues and what was done to fix them.

In the meantime, if I simply change the README instructions to use my fork, everything works for me. Here is the complete list of steps I followed (NOTE the use of my "fallwith" fork in the url given to wget).

$ brew install wget
$ brew install qt5
$ brew link qt5 --force
$ mkdir skysource
$ cd skysource
$ wget -q -O - https://raw.githubusercontent.com/fallwith/skyscraper/make_update_script_work_on_mac/update_skyscraper.sh | bash

Thank you so much!
This worked flawlessly!

@aptonline
Copy link

Hi all,
With macOS, I ran into all of the issues detailed here. Thanks for all of the great advice on workarounds. I put together a new version of the update script that aims to fix all of the problems for macOS without breaking anything under Linux.
I've submitted PR #349 which explains the root cause of all issues and what was done to fix them.
In the meantime, if I simply change the README instructions to use my fork, everything works for me. Here is the complete list of steps I followed (NOTE the use of my "fallwith" fork in the url given to wget).

$ brew install wget
$ brew install qt5
$ brew link qt5 --force
$ mkdir skysource
$ cd skysource
$ wget -q -O - https://raw.githubusercontent.com/fallwith/skyscraper/make_update_script_work_on_mac/update_skyscraper.sh | bash

Thank you so much! This worked flawlessly!

This compiles perfectly fine using the above but for some reason doesn't run when launch (no app windows). Running Monterey 12.6 on Apple Silicon.

@aptonline
Copy link

aptonline commented Oct 23, 2022

Hi @fallwith would you be able to provide a compiled version for Mac so I can test on my M1? Still having issues compiling it.

@jeantichoc
Copy link

Hi everyone, thank you for the workarounds !
I made an update_skyscraper_macos.sh with all the workarounds.
https://github.com/jean-potato/skyscraper/blob/master/update_skyscraper_macos.sh

I didn't made a pull request to add it as the owner ask to not do that

@emilianos
Copy link

this didnt work for me, what os are you on ? how can i troubleshoot?
I dont get any error, actually it just doesnt recognize any game..
(btw, I tried it in another linux system and it worked)

@Gemba
Copy link

Gemba commented Jan 6, 2024

I made an update_skyscraper_macos.sh with all the workarounds.

@jeantichoc does it work? On which MacOS config has it been tested?

Feel free to file a PR in my fork (the official maintained fork after muldjord discontinued Skyscraper).

@jeantichoc
Copy link

I made an update_skyscraper_macos.sh with all the workarounds.

@jeantichoc does it work? On which MacOS config has it been tested?

Feel free to file a PR in my fork (the official maintained fork after muldjord discontinued Skyscraper).

It doesn't work anymore with the latest MacOS version, I'll try to see with you fork and try to fix it.

@jeantichoc
Copy link

I made an update_skyscraper_macos.sh with all the workarounds.

@jeantichoc does it work? On which MacOS config has it been tested?

Feel free to file a PR in my fork (the official maintained fork after muldjord discontinued Skyscraper).

OK, it works now, I made a PR here
Gemba#15
It took me 1 hour to figure out that I had to re-execute brew link qt@5 --force 🥲
(I know nothing about C++ / QT compilation)

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

Successfully merging a pull request may close this issue.