Linuxcnc Simulator on Mac

More
10 years 1 month ago #81016 by Big_Mas74
Hi everybody,
I have an old Mac Core2Duo and i'm using it for gui development mainly and gcode subs, but while using my mac with vmware fusion and linux to run linuxcnc it's impractical.
I've read that it's not that easy to install linuxcnc on mac, but it can be done (compiled).
Now after long hours installing libraries i've reached to the following point.
Code:
./configure sim --disable-userspace-pci --without-libmodbus
i got to the point i couldn't solve it anymore
Code:
checking for insmod... none configure: error: insmod not found

i've googled about insmod and i know now it's only for linux and it's equivalent to kextload .
my question can i bypass these conditions to build linuxcnc?
i've edited ".confgure.in" and delete the request for insmod but is it really that way? or should I look for another approach?

Thanks

Please Log in to join the conversation.

More
10 years 1 month ago #81017 by andypugh
Replied by andypugh on topic Linuxcnc Simulator on Mac

Big_Mas74 wrote: Hi everybody,
I have an old Mac Core2Duo and i'm using it for gui development mainly and gcode subs, but while using my mac with vmware fusion and linux to run linuxcnc it's impractical.


What problems do you have? I actually do quite a lot of dev work using a Mac and VMware Fusion.

For stuff that needs realtime, I tend to ssh into a headless LinuxCNC motherboard sat on the bookshelf.

But, I would still quite like to see LinuxCNC running native.

Please Log in to join the conversation.

More
10 years 1 month ago #81026 by andypugh
Replied by andypugh on topic Linuxcnc Simulator on Mac
As Linux uses insmod and OSX uses kextload I think that the way to handle this would be with conditional compilation.

As far as I can see "insmod" is only used in one place in the code. (one utility is used to load/unload every kernel module)

github.com/LinuxCNC/linuxcnc/blob/7bcf62...module_helper.c#L230

So you would need something a bit like
Code:
if(inserting) { check_whitelist_module_path(mod, argc, argv); #ifdef __linux__ exec_argv[0] = "/sbin/insmod"; #elif __APPLE__ exec_argv[0] = "/sbin/kestload"; #endif exec_argv[1] = mod; for(i=3; i<argc; i++) { exec_argv[i-1] = argv[i]; } exec_argv[argc-1] = NULL; } else { check_whitelist_module(mod, argc, argv); #ifdef __linux__ exec_argv[0] = "/sbin/rmmod"; #elif __APPLE__ exec_argv[0] = "/sbin/kextunload"; #endif exec_argv[1] = mod; exec_argv[2] = NULL; }

And then the configure.in would need to check for the presence kextload if the search for insmod fails.

Please Log in to join the conversation.

More
9 years 11 months ago #82333 by robksawyer
Were you ever able to get it running natively? Able to provide binaries? :)

Please Log in to join the conversation.

More
6 years 4 months ago #173174 by JetForMe
Replied by JetForMe on topic Linuxcnc Simulator on Mac
Unfortunately, that won't be enough. Kernel Extensions on macOS need an XML plist file indicating how they're loaded and run, and extension names are reverse-domain style: org.linuxcnc.modFoo.

It might be that that's outside the scope of module_helper, which will get an appropriate extension name from an external source.

I'd sure like to be able to run and develop for LinuxCNC natively, too.

Please Log in to join the conversation.

More
6 years 4 months ago #173182 by andypugh
Replied by andypugh on topic Linuxcnc Simulator on Mac
Things have moved on a bit since this discussion started. Specifically the "uspace" build of LinuxCNC will run on a plain non-realtime kernel.
This might make things easier.

See, for example, that the module load and unload commands are abstracted to macros:
github.com/LinuxCNC/linuxcnc/blob/master...ipts/realtime.in#L59

I would guess that a Mac sim would want to satisfy the conditions to reach this line:
github.com/LinuxCNC/linuxcnc/blob/2291af...ce_rtapi_app.cc#L781

Please Log in to join the conversation.

Time to create page: 0.100 seconds
Powered by Kunena Forum