Author Topic: Eclipse Makefile/Project  (Read 31335 times)

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: Eclipse Makefile/Project
« Reply #15 on: 2012 March 16 12:03:04 »
Performing a debug session of a PixInsight module with Eclipse involves some not-so-obvious steps that deserve a separate post.
Juan, Can you say a bit more? Where is the "separate post" ?

I ask you, because I reach successful compilation(see log), successful run(see log) via Netbeans interface with some feedback.
But i can't run debugging(see PrintScreen).
Please look at log and screen.

Compilation log:
Quote
g++ -c -pipe -m64 -fPIC -D_REENTRANT -D__PCL_LINUX -I"/home/user/PCL/include" -O0 -g -fvisibility=hidden -fvisibility-inlines-hidden -fnon-call-exceptions -Wall -Wno-parentheses -MMD -MP -MF"x86_64/Debug/SandboxInstance.d" -MT"x86_64/Debug/SandboxInstance.d" -o"x86_64/Debug/SandboxInstance.o" "../../SandboxInstance.cpp"
 
g++ -c -pipe -m64 -fPIC -D_REENTRANT -D__PCL_LINUX -I"/home/user/PCL/include" -O0 -g -fvisibility=hidden -fvisibility-inlines-hidden -fnon-call-exceptions -Wall -Wno-parentheses -MMD -MP -MF"x86_64/Debug/SandboxInterface.d" -MT"x86_64/Debug/SandboxInterface.d" -o"x86_64/Debug/SandboxInterface.o" "../../SandboxInterface.cpp"
 
g++ -c -pipe -m64 -fPIC -D_REENTRANT -D__PCL_LINUX -I"/home/user/PCL/include" -O0 -g -fvisibility=hidden -fvisibility-inlines-hidden -fnon-call-exceptions -Wall -Wno-parentheses -MMD -MP -MF"x86_64/Debug/SandboxModule.d" -MT"x86_64/Debug/SandboxModule.d" -o"x86_64/Debug/SandboxModule.o" "../../SandboxModule.cpp"
 
g++ -c -pipe -m64 -fPIC -D_REENTRANT -D__PCL_LINUX -I"/home/user/PCL/include" -O0 -g -fvisibility=hidden -fvisibility-inlines-hidden -fnon-call-exceptions -Wall -Wno-parentheses -MMD -MP -MF"x86_64/Debug/SandboxParameters.d" -MT"x86_64/Debug/SandboxParameters.d" -o"x86_64/Debug/SandboxParameters.o" "../../SandboxParameters.cpp"
 
g++ -c -pipe -m64 -fPIC -D_REENTRANT -D__PCL_LINUX -I"/home/user/PCL/include" -O0 -g -fvisibility=hidden -fvisibility-inlines-hidden -fnon-call-exceptions -Wall -Wno-parentheses -MMD -MP -MF"x86_64/Debug/SandboxProcess.d" -MT"x86_64/Debug/SandboxProcess.d" -o"x86_64/Debug/SandboxProcess.o" "../../SandboxProcess.cpp"
 
g++ -m64 -fPIC -Wl,-z,noexecstack -Wl,-O1 -shared -L"/home/user/PCL/lib/linux/x86_64" -L"/home/user/PCL/x64/bin" -o "/home/user/PCL/src/modules/processes/Sandbox/linux/g++/x86_64/Debug"/Sandbox-pxm.so ./x86_64/Debug/SandboxInstance.o ./x86_64/Debug/SandboxInterface.o ./x86_64/Debug/SandboxModule.o ./x86_64/Debug/SandboxParameters.o ./x86_64/Debug/SandboxProcess.o -lpthread -lPCL-pxi
/usr/bin/make -f ./makefile-x86_64-debug --no-print-directory post-build
cp "/home/user/PCL/src/modules/processes/Sandbox/linux/g++/x86_64/Debug"/Sandbox-pxm.so /home/user/PCL/x64/bin


BUILD SUCCESSFUL (total time: 4s)


Run log:
Quote
(PixInsight:3141): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(PixInsight:3141): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(PixInsight:3141): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(PixInsight:3141): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

PixInsight Core 01.07.04.0759 Starbuck (x86_64)
Copyright (C) 2003-2011 Pleiades Astrophoto


(PixInsight:3141): Gtk-WARNING **: Unable to retrieve the file info for `file:///home/user/untitled.xpsm': Error stating file '/home/user/untitled.xpsm': No such file or directory


RUN SUCCESSFUL (total time: 59s)


Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Eclipse Makefile/Project
« Reply #16 on: 2012 March 16 16:35:39 »
PixInsight.sh is a shell script (executable text file) that sets a couple of environment variables. The real binary is PixInsight. If you try to start PixInsight directly, you get those messages about missing libraries because LD_LIBRARY_PATH is not correctly set.

Apparently NetBeans cannot handle the shell script and follow it into the actual binary -other environment can. To get it running with Netbeans, you probably need to do this:
1. set environment variables as described in PixInsight.sh, using command like export LD_LIBRARY_PATH=value (bash) or setenv (csh)
2. Start netbeans
3. Try to debug

I dont know netbeans myself, so I am not sure if there is a more elegent way. But in theory, this should do the trick.
Geirg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: Eclipse Makefile/Project
« Reply #17 on: 2012 March 17 00:12:02 »
Thank you!
I have added command /home/user/netbeans-7.1.1/bin/netbeans into PixInsight.sh
It's working! 8)
Goodbye VC++ :P