Open zenware opened 8 years ago
Hello! It would be great. There are instruction about building SASM on Mac. You could use it.
What about a homebrew formula?
@assp1r1n3 so far, creating a homebrew formula falls apart right around here https://sourceware.org/gdb/wiki/BuildingOnDarwin#Giving_gdb_permission_to_control_other_processes%7Cofficial I've asked in the IRC to no response yet, but if you've got any advice I'd love to hear it đź‘Ť
@Dman95 Hey I was just following along that guide and hit an error on step 6
Jays-MacBook-Pro:SASM-master jaylooney$ sudo make install
cp -f /Users/jaylooney/Workspace/MyHomebrewTap/SASM-master/Linux/bin/fasm /usr/bin/
cp: /usr/bin/fasm: Operation not permitted
make: [install_binfile] Error 1 (ignored)
cp -f /Users/jaylooney/Workspace/MyHomebrewTap/SASM-master/Linux/bin/listing /usr/bin/
cp: /usr/bin/listing: Operation not permitted
make: [install_binfile] Error 1 (ignored)
mkdir: /usr/share/sasm/: Operation not permitted
make: *** [install_data] Error 1
Normally I'm pretty familiar with unix permissions and would just be able to solve this, but OS X is a totally different story, I'm still in my first year using Macs and I have a lot to learn about the subtle differences between Darwin and Linux. If you've got any ideas or know who might, that would be awesome!
Actually, it looks like it did actually build the app, so maybe it's fine that it doesn't litter all over the system...
Jays-MacBook-Pro:SASM-master jaylooney$ ls | grep sasm.app
sasm.app
It also actually runs the app which is great, but building a small NASM file failed: I'm pretty sure nasm came with xcode's command line utilities
$ nasm -v
NASM version 0.98.40 (Apple Computer, Inc. build 11) compiled on Feb 10 2016
and
$ nasm -hf
...
valid output formats for -f are (`*' denotes default):
* bin flat-form binary files (e.g. DOS .COM, .SYS)
aout Linux a.out object files
aoutb NetBSD/FreeBSD a.out object files
coff COFF (i386) object files (e.g. DJGPP for DOS)
elf ELF32 (i386) object files (e.g. Linux)
as86 Linux as86 (bin86 version 0.3) object files
obj MS-DOS 16-bit/32-bit OMF object files
win32 Microsoft Win32 (i386) object files
rdf Relocatable Dynamic Object File Format v2.0
ieee IEEE-695 (LADsoft variant) object file format
macho NeXTstep/OpenStep/Rhapsody/Darwin/MacOS X object files
I think it's weird that there is a save as .exe in the menu, but not a save as 'Mach-O' or 'ELF', as well I think exe should be 'PE' in this context as people tinkering with the assembler should know the actual format of their code but those are all totally different issues
May be you should change the format from "-f elf32" to "-f elf" on the "Build" tab in the settings to avoid error messages.
As for saving with an exe extension, it is just universal extension for an executable, which will work with all systems. The internal format of a saved file will differ for each system and will be correct.
Hey @Dman95 thanks for getting back! I switched the format at your suggestion and it cleared up one of the issues, so thanks for all your help!
I'm still getting this error and I'm not getting any object file output.
My current solution for development, by the way, is that I'm using Vagrant to spin up a Gentoo VM and using the cross-compilers and everything available there. I still want to get a stable, fully working build of SASM going that I can release for others to use.
@zenware Try to change linking options in the "Settings->Build->Linking options" from "$PROGRAM.OBJ$ $MACRO.OBJ$ -g -o $PROGRAM$ -m32" to "$PROGRAM.OBJ$ -g -o $PROGRAM$ -m32"
Do you have a release build you can share?
@MatthewFrench No, I don't. Because I don't have a Mac. But there is one link about running SASM on Mac: http://www.brianrhall.net/rss/installingsasmonamac If you can make a build, I will be glad to add it to release.
I have a mac build for SASM: sasm.app.zip
It's only working with sudo: sudo /Applications/sasm.app/Contents/MacOS/sasm
The following Assembly options work for me: -g -f macho64 $SOURCE$ -l $LSTOUTPUT$ -o $PROGRAM.OBJ$ --prefix _ Linking options: $PROGRAM.OBJ$ $MACRO.OBJ$ -g -o $PROGRAM$ -m64 Assembler path: nasm Linker path: gcc x64 and NASM selected.
I haven't tried to build the new version of SAMS, but with the upgrade to macOS Sierra the debugging stopped working because of gdb... With every OS X (now macOS) version it's getting more difficult to get gdb working...
Ok, now I have a working build from version 3.6.0: sasm.app.zip
gdb is working, too. You have to install it and then sign it with a certificate.
But sudo is still required....
@Dman95 I have changed the code in the debugger.cpp because on mac you have to disable the shell startup in gdb first: "set startup-with-shell off" (Before running "disas main"). It's only a quick and dirty solution, so I don't post the code here.
Hey, what about integrating Travis county into your project? This ci service helps you to get a builds and tests coverage on every commit and supports osx builds too. With new release builds publishing feature( https://docs.travis-ci.com/user/deployment/releases/) it solves this problem at all.
On 21 Oct 2016 5:46 p.m., "sfischer123" notifications@github.com wrote:
I have a mac build for SASM: sasm.app.zip https://github.com/Dman95/SASM/files/544566/sasm.app.zip
It's only working with sudo: sudo /Applications/sasm.app/Contents/MacOS/sasm
The following Assembly options work for me: -g -f macho64 $SOURCE$ -l $LSTOUTPUT$ -o $PROGRAM.OBJ$ --prefix _ Linking options: $PROGRAM.OBJ$ $MACRO.OBJ$ -g -o $PROGRAM$ -m64 Assembler path: nasm Linker path: gcc x64 and NASM selected.
I haven't tried to build the new version of SAMS, but with the upgrade to macOS Sierra the debugging stopped working because of gdb... With every OS X (now macOS) version it's getting more difficult to get gdb working...
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Dman95/SASM/issues/57#issuecomment-255396969, or mute the thread https://github.com/notifications/unsubscribe-auth/AFDpkPWGNdBGAebUsZd-80PJot3M2QNNks5q2NBJgaJpZM4I5BgA .
I just tried the 3.8 pre-build package for Mac
$ sudo /Applications/sasm-3.8.app/Contents/MacOS/sasm
dyld: Library not loaded: @rpath/QtWidgets.framework/Versions/5/QtWidgets
Referenced from: /Applications/sasm-3.8.app/Contents/MacOS/sasm
Reason: image not found
So I guess I have to install Qt first
macOS
driver, not all the other tools and addons. I got it down to less than 2Gb from over 12Gb with all the shit included.bash_profile
PATH=$PATH:/Users/YOUR-NAME-HERE/Qt/5.8/clang_64/bin
username
and Qt
are you able to compile a MASM file? I'm trying to convert dec64 to NASM, C or JavaScript.
Any help would be greatly appreciated!!
I installed Qt for Mac (minimal install) and set the Path. What am I missing?
Still getting the Library not loaded
error.
You have to copy some files manually in the Library directory. I don't remember which ones, but you can see the missing files in the error message in the terminal. You find the files in your QT directory.
I've been looking around for an ASM environment but I think I'll end up just using vim still. I could build and provide releases for this project on OS X however (assuming it actually does build and function on OS X).