Compile files in /linuxcnc/lib/
- zz912
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 581
- Thank you received: 94
09 Nov 2025 17:18 #338121
by zz912
Compile files in /linuxcnc/lib/ was created by zz912
Hello,
I use RIP installation.
If I debug files in the /linuxcnc/src folder, I just need to be in the /linuxcnc/src folder and type $ make. Then only what I edited is compiled.
If I debug files in the /linuxcnc/lib folder, I am in the /linuxcnc/src folder and type $ make, nothing happens.
I have to type $ make -B, but it takes a long time.
How should I debug the file:
/linuxcnc/lib/python/gladevcp/builtin-panels/gtk_little_probe/gtk_little_probe.py
?
I use RIP installation.
If I debug files in the /linuxcnc/src folder, I just need to be in the /linuxcnc/src folder and type $ make. Then only what I edited is compiled.
If I debug files in the /linuxcnc/lib folder, I am in the /linuxcnc/src folder and type $ make, nothing happens.
I have to type $ make -B, but it takes a long time.
How should I debug the file:
/linuxcnc/lib/python/gladevcp/builtin-panels/gtk_little_probe/gtk_little_probe.py
?
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 19741
- Thank you received: 4579
11 Nov 2025 17:06 #338197
by andypugh
Replied by andypugh on topic Compile files in /linuxcnc/lib/
You probably don't need to compile the gtk_little_probe.py file.
Python is an interpreted language, so often you just need to make the edits and run the code.
So, the reason that "make" is not doing anything is that the file in question is not mentioned in the makefile, as it is simply interpreted as and when needed.
(There is a complication that Python code is compiled to bytecode (.pyc) and sometimes that might be run instead.)
To be sure that your edited file is running, maybe put a "print("this is version 2.2.2") near the top of the file?
Python is an interpreted language, so often you just need to make the edits and run the code.
So, the reason that "make" is not doing anything is that the file in question is not mentioned in the makefile, as it is simply interpreted as and when needed.
(There is a complication that Python code is compiled to bytecode (.pyc) and sometimes that might be run instead.)
To be sure that your edited file is running, maybe put a "print("this is version 2.2.2") near the top of the file?
Please Log in or Create an account to join the conversation.
- zz912
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 581
- Thank you received: 94
11 Nov 2025 18:58 #338206
by zz912
It is true, but not in LCNC.
If I modify this file:
/home/zdenek/linuxcnc/linuxcnc-zz912/src/emc/usr_intf/gmoccapy/gmoccapy.py
It returns:
The most important sentence is:
Copying python script gmoccapy
Id dont know why and where, but it works.
gmoccapy.py is in /src/ folder and it works.
I placed the wrong file here, I meant:
/linuxcnc/lib/python/gladevcp/builtin-panels/gtk_verser_probe/gtk_verser_probe.py
You can try modify it, but noting happens.
MAKE doesnt see it.
Replied by zz912 on topic Compile files in /linuxcnc/lib/
You probably don't need to compile the gtk_little_probe.py file.
Python is an interpreted language, so often you just need to make the edits and run the code.
It is true, but not in LCNC.
If I modify this file:
/home/zdenek/linuxcnc/linuxcnc-zz912/src/emc/usr_intf/gmoccapy/gmoccapy.py
It returns:
zdenek@cnc:~/linuxcnc/linuxcnc-zz912/src$ make
Reading 203/203 dependency files
Done reading dependencies
Reading 274/274 realtime dependency files
Done reading realtime dependencies
make: Vstupuje se do adresáře „/home/zdenek/linuxcnc/linuxcnc-zz912/src“
Syntax checking python script gmoccapy
Copying python script gmoccapy
You now need to run 'sudo make setuid' in order to run in place with access to hardware.
make: Opouští se adresář „/home/zdenek/linuxcnc/linuxcnc-zz912/src“The most important sentence is:
Copying python script gmoccapy
Id dont know why and where, but it works.
gmoccapy.py is in /src/ folder and it works.
I placed the wrong file here, I meant:
/linuxcnc/lib/python/gladevcp/builtin-panels/gtk_verser_probe/gtk_verser_probe.py
You can try modify it, but noting happens.
MAKE doesnt see it.
Please Log in or Create an account to join the conversation.
- zz912
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 581
- Thank you received: 94
12 Nov 2025 17:33 #338265
by zz912
Replied by zz912 on topic Compile files in /linuxcnc/lib/
Hi Andy,
Sorry for the confusion.
Python files in /linuxcnc/lib/ may not be processed by the "make" command.
Python files in /linuxcnc/src/ may be processed by the "make" command.
I've tested it now.
You were right.
Sorry for the confusion.
Python files in /linuxcnc/lib/ may not be processed by the "make" command.
Python files in /linuxcnc/src/ may be processed by the "make" command.
I've tested it now.
You were right.
Please Log in or Create an account to join the conversation.
Time to create page: 0.063 seconds