Homebrew Help with compiling Super Mario 64 3DS

  • Thread starter Wavy
  • Start date
  • Views 23,129
  • Replies 83
  • Likes 1

Joom

 ❤❤❤
Member
Joined
Jan 8, 2016
Messages
6,067
Trophies
1
Location
US
Website
mogbox.net
XP
6,075
Country
United States
Huh. I removed [sudo] from both and tried to run it but I got the same errors for both of the commands.
Look for a .lock file in /etc/apt. I think it's called db.lock, but if not, it'll be another name with the same extension. This file is created to prevent more than one instance of apt-get from running, but sometimes when apt-get is ended abruptly, this file isn't deleted and will prevent you from doing anything until you manually remove it.
 

Wavy

Splatana Stamper Enjoyer
OP
Member
Joined
Aug 24, 2020
Messages
300
Trophies
0
Location
MAP13: Downtown
XP
1,565
Country
Australia
Look for a .lock file in /etc/apt. I think it's called db.lock, but if not, it'll be another name with the same extension. This file is created to prevent more than one instance of apt-get from running, but sometimes when apt-get is ended abruptly, this file isn't deleted and will prevent you from doing anything until you manually remove it.
Where exactly would db.lock be? I know it's in [/etc/apt], but where exactly would [/etc/apt] be?
 

Joom

 ❤❤❤
Member
Joined
Jan 8, 2016
Messages
6,067
Trophies
1
Location
US
Website
mogbox.net
XP
6,075
Country
United States
Where exactly would db.lock be? I know it's in [/etc/apt], but where exactly would [/etc/apt] be?
You'll type this.
Code:
cd /etc/apt
ls -a
The first command will navigate to that folder, and the second one will list all the files in that directory. Like I said, I don't remember if it's called db.lock, but I know for certain it's a lock file. Additionally, you could just run this after using cd to get to the directory.
Code:
rm *.lock
This will delete any file with the .lock extension in the directory.
 
Last edited by Joom,

Wavy

Splatana Stamper Enjoyer
OP
Member
Joined
Aug 24, 2020
Messages
300
Trophies
0
Location
MAP13: Downtown
XP
1,565
Country
Australia
You'll type this.
Code:
cd /etc/apt
ls -a
The first command will navigate to that folder, and the second one will list all the files in that directory. Like I said, I don't remember if it's called db.lock, but I know for certain it's a lock file. Additionally, you could just run this after using cd to get to the directory.
Code:
rm *.lock
This will delete any file with the .lock extension in the directory.
Ubuntu couldn't find anything in /etc/apt that had a .lock file type. It says:
Code:
rm: cannot remove '*.lock': No such file or directory
But in /etc/, there's a .lock called [.pwd.lock]
Is that the lock file I need to remove, or is it another?

EDIT: I searched and [.pwd.lock] is related to passwords, and [db.lock] only allows 1 database to be installed at a time (i think), so I don't know
 
Last edited by Wavy,

Joom

 ❤❤❤
Member
Joined
Jan 8, 2016
Messages
6,067
Trophies
1
Location
US
Website
mogbox.net
XP
6,075
Country
United States
Alright, so something else is going on. Restart the terminal as your normal user (meaning you shouldn't login as root) and then run this.
Code:
sudo chmod 1777 /tmp
sudo chmod 1777 /var/tmp
This will fix the permissions of your temp directories, which seem to be broken for some reason. Also, as a note, you should never login as the root user. Fiddling around with stuff as that user tends to cause problems if you're not that familiar with Linux. Also, if changing the permissions doesn't fix it, you can try this.
Code:
sudo apt -o APT::Sandbox::User=root update
Oh, I also noticed that you're trying to compile this from your C drive's mount point. Don't do that. You can later copy the compiled game to it from your build environment. Once you get apt fixed, use it to install git and clone the repo to your home directory.
Code:
sudo apt-get install git
cd
git clone https://github.com/sm64-port/sm64_3ds.git
cd sm64_3ds
 
Last edited by Joom,

Wavy

Splatana Stamper Enjoyer
OP
Member
Joined
Aug 24, 2020
Messages
300
Trophies
0
Location
MAP13: Downtown
XP
1,565
Country
Australia
Alright, so something else is going on. Restart the terminal as your normal user (meaning you shouldn't login as root) and then run this.
Code:
sudo chmod 1777 /tmp
sudo chmod 1777 /var/tmp
This will fix the permissions of your temp directories, which seem to be broken for some reason. Also, as a note, you should never login as the root user. Fiddling around with stuff as that user tends to cause problems if you're not that familiar with Linux. Also, if changing the permissions doesn't fix it, you can try this.
Code:
sudo apt -o APT::Sandbox::User=root update
Ok. New problem. Apparently it can't find /tmp when I did:
Code:
sudo chmod 1777 /tmp
Which gives me this error:
Code:
chmod: cannot access '/tmp': No such file or directory
I have a strong feeling that I shot myself in the foot by doing everything as the root user. If so, frick
 

IC_

GBAtemp's ???
Member
Joined
Aug 24, 2017
Messages
1,569
Trophies
1
Location
The Forest
XP
5,300
Country
Antarctica
No, you run them by themselves. Also, if the dpkg command doesn't work (I forgot this is Ubuntu, not Debian), you may have to run this instead.
Code:
sudo apt-get install -f
They do the same thing, but I think dpkg is part of aptitude, which Ubuntu doesn't come packaged with by default. Sorry, it's been a good while since I've messed around with the Ubuntu/Debian package manager.
I'm pretty sure dpkg is the actual core package manager and apt is the frontend for it that manages the repositories
 

Joom

 ❤❤❤
Member
Joined
Jan 8, 2016
Messages
6,067
Trophies
1
Location
US
Website
mogbox.net
XP
6,075
Country
United States
Ok. New problem. Apparently it can't find /tmp when I did:
Code:
sudo chmod 1777 /tmp
Which gives me this error:
Code:
chmod: cannot access '/tmp': No such file or directory
I have a strong feeling that I shot myself in the foot by doing everything as the root user. If so, frick
Alright, cool, this just means the directory is missing.
Code:
sudo mkdir -p /tmp
sudo mkdir -p /var/tmp
After doing this, run the commands to fix the permissions again. Also, I've been Googling around and this seems like a common problem with Ubuntu 18.04 under WSL. Doesn't seem to be a problem with 20.04.
I'm pretty sure dpkg is the actual core package manager and apt is the frontend for it that manages the repositories
Yup, you're right. apt-get, aptitude, and gdebi are essentially wrappers for it. Like I said, it's been a good while since I've tinkered with the Debian ecosystem, so I got it a little backwards.
 
Last edited by Joom,

Wavy

Splatana Stamper Enjoyer
OP
Member
Joined
Aug 24, 2020
Messages
300
Trophies
0
Location
MAP13: Downtown
XP
1,565
Country
Australia
Alright, cool, this just means the directory is missing.
Code:
sudo mkdir -p /tmp
sudo mkdir -p /var/tmp
After doing this, run the commands to fix the permissions again. Also, I've been Googling around and this seems like a common problem with Ubuntu 18.04 under WSL. Doesn't seem to be a problem with 20.04.

Yup, you're right. apt-get, aptitude, and gdebi are essentially wrappers for it. Like I said, it's been a good while since I've tinkered with the Debian ecosystem, so I got it a little backwards.
Nice! I made /tmp and /var/tmp, set their permissions, installed the sm64_3ds source in my home, and put baserom.us.z64 in there too. So what do I do now? db.lock isnt in /etc/apt, do I run [sudo apt-get update] and [sudo apt-get install -f] to update those broken repositories and fix the installations?
 

Joom

 ❤❤❤
Member
Joined
Jan 8, 2016
Messages
6,067
Trophies
1
Location
US
Website
mogbox.net
XP
6,075
Country
United States
Nice! I made /tmp and /var/tmp, set their permissions, installed the sm64_3ds source in my home, and put baserom.us.z64 in there too. So what do I do now? db.lock isnt in /etc/apt, do I run [sudo apt-get update] and [sudo apt-get install -f] to update those broken repositories and fix the installations?
Precisely. Once you've ran apt-get, you should be able to build the game provided nothing else needs fixing.
 

Wavy

Splatana Stamper Enjoyer
OP
Member
Joined
Aug 24, 2020
Messages
300
Trophies
0
Location
MAP13: Downtown
XP
1,565
Country
Australia
Precisely. Once you've ran apt-get, you should be able to build the game provided nothing else needs fixing.
I ran [sudo apt-get update] and [sudo apt-get install -f] in my home, which didn't result in any errors, but when I went into /sm64_3ds and typed make, It was extracting assets until it gave me this error:
Code:
cc1: error: '-mfloat-abi=hard': selected processor lacks an FPU
make: *** [Makefile:805: build/us_3ds/src/engine/surface_collision.o] Error 1
Should I reinstall devkitPro and gcc-arm in my home? or only reinstall gcc-arm in my home using the command you said to use in one of the previous post's.

Edit: For devkitPro, should I reinstall it as the Windows or Linux version?
 
Last edited by Wavy,

Deleted member 373223

Pink = Best colour
Member
Joined
Oct 8, 2015
Messages
4,099
Trophies
1
XP
2,790
While not direct help, I'd reccomend setting up WSL 2, just so it goes faster https://docs.microsoft.com/en-us/windows/wsl/install-win10#update-to-wsl-2
Though you'll have to be warned that while the "Virtual Machine Platform" component is enabled, you'll be unable to use virtualization software such as VirtualBox, and you'll have to disable it to run those. And the reverse is true, you'll have to enable it to use a WSL 2 instance.
 
  • Like
Reactions: Wavy

Deleted member 373223

Pink = Best colour
Member
Joined
Oct 8, 2015
Messages
4,099
Trophies
1
XP
2,790
Okay, so, these commands should result in making a fully working mario 64 3dsx on Ubuntu 20.04 (have not tested on LTS 18, i'd reccomend using 20.04).
You should run those inside the folder where you have the sm64 3ds source and baserom.us.z64
Code:
sudo apt update
sudo apt install build-essential pkg-config git python3 zlib1g-dev libaudiofile-dev
wget https://github.com/devkitPro/pacman/releases/latest/download/devkitpro-pacman.amd64.deb
sudo apt install gdebi-core
sudo gdebi devkitpro-pacman.amd64.deb
rm devkitpro-pacman.amd64.deb
sudo dkp-pacman -Sy
sudo dkp-pacman -Syu
sudo dkp-pacman -S 3ds-dev
I am not a linux expert, far from it, so there may be more optimal ways to write all this, but basically:

Code:
sudo apt update
sudo apt install build-essential pkg-config git python3 zlib1g-dev libaudiofile-dev
result in installing all the dependencies installable via apt

Code:
wget https://github.com/devkitPro/pacman/releases/latest/download/devkitpro-pacman.amd64.deb
sudo apt install gdebi-core
sudo gdebi devkitpro-pacman.amd64.deb
rm devkitpro-pacman.amd64.deb
This results in installing the devkitpro Pacman
Code:
sudo dkp-pacman -Sy
sudo dkp-pacman -Syu
sudo dkp-pacman -S 3ds-dev
This results in installing the devkitpro 3ds dev libraries
After this, you should restart the shell by simply closing the Ubuntu 20.04 LTS window and then reopening it.
Then, simply run
Code:
make -j4
 
  • Like
Reactions: Joom and Wavy

Wavy

Splatana Stamper Enjoyer
OP
Member
Joined
Aug 24, 2020
Messages
300
Trophies
0
Location
MAP13: Downtown
XP
1,565
Country
Australia
Okay, so, these commands should result in making a fully working mario 64 3dsx on Ubuntu 20.04 (have not tested on LTS 18, i'd reccomend using 20.04).
You should run those inside the folder where you have the sm64 3ds source and baserom.us.z64
Code:
sudo apt update
sudo apt install build-essential pkg-config git python3 zlib1g-dev libaudiofile-dev
wget https://github.com/devkitPro/pacman/releases/latest/download/devkitpro-pacman.amd64.deb
sudo apt install gdebi-core
sudo gdebi devkitpro-pacman.amd64.deb
rm devkitpro-pacman.amd64.deb
sudo dkp-pacman -Sy
sudo dkp-pacman -Syu
sudo dkp-pacman -S 3ds-dev
I am not a linux expert, far from it, so there may be more optimal ways to write all this, but basically:

Code:
sudo apt update
sudo apt install build-essential pkg-config git python3 zlib1g-dev libaudiofile-dev
result in installing all the dependencies installable via apt

Code:
wget https://github.com/devkitPro/pacman/releases/latest/download/devkitpro-pacman.amd64.deb
sudo apt install gdebi-core
sudo gdebi devkitpro-pacman.amd64.deb
rm devkitpro-pacman.amd64.deb
This results in installing the devkitpro Pacman
Code:
sudo dkp-pacman -Sy
sudo dkp-pacman -Syu
sudo dkp-pacman -S 3ds-dev
This results in installing the devkitpro 3ds dev libraries
After this, you should restart the shell by simply closing the Ubuntu 20.04 LTS window and then reopening it.
Then, simply run
Code:
make -j4

Thanks! I'll try these when I can!
 

rolenks

Well-Known Member
Newcomer
Joined
Jul 15, 2020
Messages
65
Trophies
0
Age
23
XP
314
Country
United States
wait so does this port run perfectly or something because then what's really the difference cause before i try something like this i worry it that it might just be daedalus64 Mario 64 with extra steps. Especially since it can't even be a cia file
 

Shadow#1

Wii, 3DS Softmod & Dumpster Diving Expert
Member
Joined
Nov 21, 2005
Messages
12,341
Trophies
2
XP
7,984
Country
United States
wait so does this port run perfectly or something because then what's really the difference cause before i try something like this i worry it that it might just be daedalus64 Mario 64 with extra steps. Especially since it can't even be a cia file
It's the pc port ported to 3ds it's not emulation
 

Deleted member 323844

Well-Known Member
Member
Joined
Feb 17, 2013
Messages
802
Trophies
1
XP
2,335
Country
Spain
i get that, it's just that i saw that it comes with a framerate counter so i was wondering how well it could run at a consistent framerate
Mkst build should run at stable 30FPS both in 3D or 800PX mode.

60FPS should also run "fine", but it has some drops when there's a lot of geometry in sight, like at the top of the mountains.

Sound is the resource hog of this port tho, it's the biggest limitation of the o3DS and PSP ports. Nintendo 64 is a really weird beast and, unlike pretty much every other console in the history, it doesn't have a sound processor. Instead the CPU feeds the Reality Signal Processor with the sound data, the sound lists and the microcode (the same processor that creates the polygons also creates the soundwave). I guess that's why sound is so problematic in this port.
 
Last edited by Deleted member 323844,

Joom

 ❤❤❤
Member
Joined
Jan 8, 2016
Messages
6,067
Trophies
1
Location
US
Website
mogbox.net
XP
6,075
Country
United States
I am not a linux expert, far from it, so there may be more optimal ways to write all this, but basically:
Only thing I see that's unnecessary is running -Sy and then -Syu. Other than that, should be fine. Also, if you want a little tip, you can chain commands with two ampersands.
Code:
sudo -s && pacman -Syu && pacman -S 3ds-dev
If you ever want to write an install script or something, you can do this to keep it simple and clean.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    LeoTCK @ LeoTCK: yes for nearly a month i was officially a wanted fugitive, until yesterday when it ended