gdb: no source file named main.cpp problem

General questions regarding the usage of CodeLite
varnie
CodeLite Veteran
Posts: 64
Joined: Wed Jun 11, 2008 3:48 am
Contact:

Re: gdb: no source file named main.cpp problem

Post by varnie » Tue Jun 24, 2008 1:34 pm

eranif wrote:Can you do this:
- Perform a complete re-build (Clean followed by Build)
- make sure that in build log there is a '-g' option
- Right click on project -> settings ->General tab - and make sure that the 'Command' field contains the executable that was created.
yes, these options are all enabled.
Off topic question: Can you update CodeLite to newer version? I have made some changes in the debugger which may impact on bug you are experiencing.
tried to build latest sources which i've fetched over svn but get the following:
test -d Release_gcc_unicode || mkdir Release_gcc-unicode
test -d lib || mkdir lib

Warning: No config found to match: /usr/local/bin/wx-config --cxxflags --unicode=yes --debug=0
in /usr/local/lib/wx/config
...
...
...
CodeLite/archive.h:28:23: error: wx/string.h: No such file or directory
same errors related to wx* headers
but i do have installed wxgtk2 with unicode support:
pkg_info|grep "wxgtk"
wxgtk2-2.6.3_5 The wxWidgets GUI toolkit with GTK+ bindings
wxgtk2-common-2.6.3_4 The wxWidgets GUI toolkit (common files)
wxgtk2-common-2.8.7_1 The wxWidgets GUI toolkit (common files)
wxgtk2-contrib-2.6.3_3 The wxWidgets GUI toolkit contributed libraries
wxgtk2-contrib-common-2.6.3_3 The wxWidgets GUI toolkit contributed libraries (common fil
wxgtk2-unicode-2.6.3_5 The wxWidgets GUI toolkit (Unicode)
wxgtk2-unicode-2.8.7_1 The wxWidgets GUI toolkit (Unicode)
wxgtk2-unicode-contrib-2.6.3_3 The wxWidgets GUI toolkit contributed libraries (Unicode)
my wx-headers are located here:
/usr/local/include/wx-2.6/
/usr/local/include/wx-2.8/
tried to add these patches to Makefile but then i get other wx-related errors.

it would be cool to have new CodeLite's FreeBSD package/port, but there's no one on this moment and we have to build it from sources manually. by the way, the CodeLite SVN Build, Revision: 1599 port which is in FreeBSD portstree system compiled just fine.
maybe to start new topic describing the details of CodeLite updating on FreeBSD box?
Last edited by varnie on Tue Jun 24, 2008 2:04 pm, edited 1 time in total.

User avatar
eranif
CodeLite Plugin
Posts: 5982
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: gdb: no source file named main.cpp problem

Post by eranif » Tue Jun 24, 2008 2:04 pm

I am guessing that what you have on your machine is the WXGTK2 runtime files, but not the development package.

Why don't you download wx and build it from sources?

you can download it from here:
http://prdownloads.sourceforge.net/wxwi ... 8.8.tar.gz

Once extracted, cd to the directory where you unpacked the tar.gz and type:

Code: Select all

./configure --disable-debug --enable-unicode --enable-monolithic 
make 
sudo make install
after that, make sure that the wx-config tool is working properly:

Code: Select all

wx-config --version
It should report: 2.8.8 (the package you just installed)

next, try to compiler Codelite again:

Code: Select all

cd codelite/trunk/
./configure
make 
sudo make install
Eran
Make sure you have read the HOW TO POST thread

varnie
CodeLite Veteran
Posts: 64
Joined: Wed Jun 11, 2008 3:48 am
Contact:

Re: gdb: no source file named main.cpp problem

Post by varnie » Tue Jun 24, 2008 3:58 pm

hehe, good news! i successfully installed new CodeLite version on FreeBSD box :)
i want to enlight several notes:
1. instead of make i used gmake, i.e. it looked like "./configure && gmake install"
2. there's #include "gtk/gtk.h" in plugins/splashscreen.cpp which compiler couldn't resolve on my machine. and therefore i run " pkg-config --cflags gtk+-2.0" and add output to Makefile. for me it looked like:
-I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/usr/local/include/atk-1.0 -I/usr/local/include/cairo -I/usr/local/include/pango-1.0 -I/usr/local/include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/freetype2
and after this addition the process goes well till the end but here we met another problem:
there is a command "@cp -fpr Runtime/codelite.desktop /usr/share/applications/" in Makefile (on its 1817 line) but there's no such directory on my FreeBSD box and thus this command spits an error. therefore i created this "applications" directory manually. few commands later there's command "@chmod -R 777 /usr/local/share/codelite" which gave me an error "chmod: -R: No such file or directory" too (in this case, don't know why, because there IS such directory). but in any case i got CodeLite Revision 1736 installed on my FreeBSD machine :))) cool!

now switch to strange things: i can't find enabled plugins in this CodeLite version (i.e. theres' no, say, subversion, code formatter etc plugins in "Plugins" menu which have been available in my previous CodeLite installed version) and there's strange thing in Settings-->Debugger Settings-->Loaded Debuggers (this panel is empty and now i have no ideas about how to debug using CodeLite).

that's all :)

varnie
CodeLite Veteran
Posts: 64
Joined: Wed Jun 11, 2008 3:48 am
Contact:

Re: gdb: no source file named main.cpp problem

Post by varnie » Tue Jun 24, 2008 4:17 pm

now i figured out what's going on. my installation haven't been complete and it stops on Makefile's line:
@chmod +w /usr/local/share/codelite/templates/* -R
this line isn't correct (at least my FreeBSD system say so :))

varnie
CodeLite Veteran
Posts: 64
Joined: Wed Jun 11, 2008 3:48 am
Contact:

Re: gdb: no source file named main.cpp problem

Post by varnie » Tue Jun 24, 2008 4:29 pm

i finnaly get it works!

changed that line to
@chmod -R +w /usr/local/shared/codelite/templates/*
and after that created ~/Desktop directory.
now i have completely installed CodeLite with all its plugins and debugger :)) cool!

User avatar
eranif
CodeLite Plugin
Posts: 5982
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: gdb: no source file named main.cpp problem

Post by eranif » Tue Jun 24, 2008 4:35 pm

varnie wrote:there's #include "gtk/gtk.h" in plugins/splashscreen.cpp which compiler couldn't resolve on my machine. and therefore i run " pkg-config --cflags gtk+-2.0" and add output to Makefile. for me it
This is already done for Linux automatically, I guess that the problem is the output of `uname -s` - which it will add it when the output is Linux - I guess the output for FreeBSD is diferent (can you please let me know the output of the uname -s and uname -m on your machine so I can updare configure script)?
varnie wrote:now i figured out what's going on. my installation haven't been complete and it stops on Makefile's line:

@chmod +w /usr/local/share/codelite/templates/* -R


this line isn't correct (at least my FreeBSD system say so :))
The funny thing is that line was added in order to fix a bug you reported eralier (main.cpp has r-r-r- permissions...)

Can you tell me the equivalent command on FreeBSD?

Eran
Make sure you have read the HOW TO POST thread

varnie
CodeLite Veteran
Posts: 64
Joined: Wed Jun 11, 2008 3:48 am
Contact:

Re: gdb: no source file named main.cpp problem

Post by varnie » Tue Jun 24, 2008 4:57 pm

here is my configuration:
uname -s
FreeBSD
uname -m
i386
uname -a
FreeBSD .lan 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Wed Jun 11 22:57:17 YEKST 2008 varnie@.lan:/usr/obj/usr/src/sys/kernel-11-06-08 i386
and here's info from "man chmod":
NAME
chmod -- change file modes

SYNOPSIS
chmod [-fhv] [-R [-H | -L | -P]] mode file ...
thus, "@chmod -R +w /usr/local/shared/codelite/templates/*" is correct as i supposed above.

by the way, there's another "chmod -R" command in generated Makefile, but on this time it is correct:
@chmod -R 777 /usr/local/bin/CodeLite

User avatar
eranif
CodeLite Plugin
Posts: 5982
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: gdb: no source file named main.cpp problem

Post by eranif » Tue Jun 24, 2008 6:25 pm

Thanks for the input I will update the configure script, so the source files can be built out-of-the-box for FreeBSD

Eran
Make sure you have read the HOW TO POST thread

varnie
CodeLite Veteran
Posts: 64
Joined: Wed Jun 11, 2008 3:48 am
Contact:

Re: gdb: no source file named main.cpp problem

Post by varnie » Tue Jun 24, 2008 7:25 pm

it sounds good. i guess, we are few steps from building newer CodeLite FreeBSD port and sending it to FreeBSD ports maintainers. if i can help you here, just let me know.

User avatar
eranif
CodeLite Plugin
Posts: 5982
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: gdb: no source file named main.cpp problem

Post by eranif » Tue Jun 24, 2008 7:49 pm

Ok thanks alot.
Make sure you have read the HOW TO POST thread

Post Reply