-
Notifications
You must be signed in to change notification settings - Fork 85
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
Error compiling with Clang on macOS #69
Comments
Thanks for your time and work. From what I've read, c++17 renders this type of gpsim exception statement as an error. Using c++14 it is just a warning. I believe that adding the Using g++ should compile just fine, try removing the |
Thanks for your feedback. I've tried adding
But quick search gave me the clue and I fixed it by replacing I tried to flash some example programs to Uno simulator through pts-mode tty0tty and it worked like a charm. But once I switched to ESP32, I noticed that it had some issues connecting to the TTY. After confirming my configurations, PICSimLab hanged. With arguments printed in the logs, I tried running:
Aaaand I got SEGV, here's the logs from macOS:
I guess this is the one that caused the hang but I don't really understand what was going on. |
Hi @fathonix , |
Thank you very much for your time and help. I can confirm that Regarding the serial, I'm still trying to find a virtual serial driver for macOS. Many people suggested MacOSXVirtualSerialPort, which is very outdated and doesn't work on modern macOS. But I found another driver and this one runs on newer macOS but still in early stage. The problem is that this driver isn't signed so it needs System Integrity Protection disabled, and I don't think that's the best idea. But signing requires Apple Developer membership and it costs $99 annually. After fiddling around with Xcode build settings and macOS security stuff, apparently the driver is broken. I got it to run, I could connect on one side but the other side just threw "Resource busy." I don't put much hope on it either, since the dev kind of already abandoned it (the last commit is from 2018). |
I'm going to put an option to be able to disable the use of DTR/DSR to work with the pts without getting hang. |
I have implemented the option to disable DTR/RTS signals use in commits 573dc9c and 96f0a09. Use the menu File->configure With the option disabled, the reset must be done manually to flash the board. |
Dear @fathonix, I upgraded the macOS to Sonoma 14.0 and plan to build for native macOS binaries. Thanks, Laris |
Hi @laris , there are some scripts in this pull request. |
Thanks @lcgamboa, I struggle for that two scripts but still failed to compile full code. |
@lcgamboa I'm trying to build dependence pkg one by one follow
|
Hi @laris , this script is a hack to generate a library instead of an executable.
The sed part separates only the last line of the .rsp file, removes the softmmu_main.c.o object, and adds the options to compile as a library. The last call compiles the program as a library with the options passed in the edited .rsp file. |
Yes, I understand the procedures (rm -f qemu-system-arm then ninja -d keeprsp) but it looks like the ninja command will don't generate the *.rsp file. This is the configure parts (only run before make), could you help to double check if any package missing?
|
Apparently there is no missing package/modules. Running ninja after remove qemu-system-arm inside build dir (in linux):
The qemu-system-arm.rsp are generated. Running without remove qemu-system-arm:
The qemu-system-arm.rsp aren't generated. The .rsp file generate in Linux (for use with gcc), maybe it work with clang. |
I got one step forward:), need remove
|
repeat to test:
|
I tried to reduce the backed simulator but still cannot compile picsimlab.
|
I almost pass and only one error now.
|
Try to replace: |
I update two bind to |
I got SEGFAULT :)
|
looks like works now after add |
|
https://github.com/laris/picsimlab forked version, only provide simavr backend and AVR boards OBJS+= boards/bsim_simavr.o # simavr backend |
I was trying to compile PICSimLab on my M1 MacBook Pro running macOS Monterey 12.4. After working around several hurdles, I eventually got things compiled (
picsim
(had to add-framework OpenAL
toSHLIBS
cuz./configure
didn't detect Apple's OpenAL),lxrad
,tty0tty
(butpts
instead ofmodule
),simavr
,uCsim
andqemu-stm32
) except the PICSimLab itself.Everything in
tools
likePinViewer
,espmsim
andsrtank
were successfully compiled, exceptsrc
. I got this error when runningmake -j$(nproc)
:But if I change
CXX
in Makefiles to GCC-12, everything was compiled but I gottools/srtank
warnings andsrc
errors linking to GPSim:Output of
g++ -v
(alias toclang++
in macOS):Output of
g++-12 -v
:I used the GPSim package provided by Homebrew, which was compiled with
--disable-dependency-tracking
,--disable-gui
and--disable-shared
but I applied a patch from a Debian mantainer to avoidgpsim/breakpoints.h:25:10: fatal error: ../config.h: No such file or directory
.I'm myself not a C/C++ dev but familiar with building packages in Linux so I just tried running commands in
bscripts/build_all_and_install.sh
by hand and tweaking them to suit macOS.Once PICSimLab is built, I'm gonna make a
.app
wrapper for making PICSimLab a proper macOS application that can be accessed through Launchpad.Any help would be very appreciated. Thank you.
The text was updated successfully, but these errors were encountered: