Author Topic: Settings don't get saved (svn 4454)  (Read 31373 times)

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Settings don't get saved (svn 4454)
« Reply #60 on: October 16, 2007, 01:36:23 pm »
You have to add the line
Code: [Select]
http://apt.tt-solutions.com/debian/ etch mainto /etc/apt/sources.list (as root)
and with
Code: [Select]
wget -q http://www.tt-solutions.com/vz/key.asc -O-  | sudo apt-key add -(also as user root) Vadim Zeitlin's public-key is added to apt trusted key database.
Vadim Zeitlin signed the wxWidgets packages on tt-solutions.com (he's one of the wxWidgets developers).
Without that key you get an (overridable) error message.
"apt" is the backend for synaptic and aptitude.

You can fetch compiled nightlies for debian (etch / stable, lenny / testing, sid /unstable) from my repo.
Have a look at the latest nightlies threads.

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Settings don't get saved (svn 4454)
« Reply #61 on: October 16, 2007, 03:55:51 pm »
Sorry I haven't tried the nightlies because I specifically want to try the same s/ware version on both PC's.

I typed both of your lines into the relevant places but it seems to have screwed me up completely. If I now launch Synaptic (or try to use apt-get) I see an error looking something like this:-

Quote
'http://apt.tt-solutions.com/debian/' is not known on line 5 in source list /etc/apt/sources.list
The list of sources could not be read

Is the syntax right (e.g. should there be a space before 'etch'?)


[Edit...] Also - I've assumed that '-O-' is a letter 'O' and not a number zero.
« Last Edit: October 16, 2007, 03:57:30 pm by johne53 »

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Settings don't get saved (svn 4454)
« Reply #62 on: October 16, 2007, 04:25:06 pm »
the letter O is right, and I forgot a deb at the beginning of the line for sources.list.
Try:
Code: [Select]
deb http://apt.tt-solutions.com/debian/ etch main
I'm very sorry  :?

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Settings don't get saved (svn 4454)
« Reply #63 on: October 16, 2007, 04:53:07 pm »
Thanks for the correction. That seems to have got me a bit further - though not really a lot further. I now get this error when launching synaptic....

Quote
W: Couldn't stat source package list http://apt.tt-solutions.com etch/main Packages (/var/lib/apt/lists/apt.tt-solutions.com_debian_dists_etch_main_binary-i386_Packages) - stat (2 No such file or directory)

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Settings don't get saved (svn 4454)
« Reply #64 on: October 16, 2007, 05:52:57 pm »
Did you start synaptic with root-privileges ?
If I delete "/var/lib/apt/lists/apt.tt-solutions.com_debian_dists_etch_*" manually, and after that start it as normal user, I get this message.
If you start it as root, try
Code: [Select]
apt-get update from a console (as root of course).
If that doesn't work you can post your "/etc/apt/sources.list", and I look for an error.

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Settings don't get saved (svn 4454)
« Reply #65 on: October 16, 2007, 06:40:59 pm »
Thanks.... apt-get update did the trick and I've now installed wxWidgets 2.8. Unfortunately (groan...  :( ) I still can't get C::B to build. The ./bootstrap and ./configure stages seem to go okay - but then when I run make I get this error which I think is at the linking stage):-

Quote
g++ -O2 -ffast-math -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -o .libs/codeblocks app.o appglobals.o compilersettingsdlg.o crashhandler.o dlgabout.o dlgaboutplugin.o environmentsettingsdlg.o infopane.o ipc.o main.o prefix.o printdlg.o scriptconsole.o scriptingsettingsdlg.o splashscreen.o startherepage.o -pthread  -lm -L/media/SHAREDDATA/CodeBlocks/src/src/wxAUI /media/SHAREDDATA/CodeBlocks/src/src/wxAUI/.libs/libwxaui.a /usr/lib/libgtk-x11-2.0.so /usr/lib/libgdk-x11-2.0.so /usr/lib/libatk-1.0.so /usr/lib/libgdk_pixbuf-2.0.so /usr/lib/libpangocairo-1.0.so -lXext -lXinerama -lXi -lXrandr -lXcursor -lXfixes /usr/lib/libpango-1.0.so /usr/lib/libcairo.so /usr/lib/libfreetype.so -lz -lfontconfig -lpng12 -lXrender -lX11 /usr/lib/libgobject-2.0.so /usr/lib/libgmodule-2.0.so /usr/lib/libglib-2.0.so -lrt -L/media/SHAREDDATA/CodeBlocks/src/sdk /media/SHAREDDATA/CodeBlocks/src/sdk/.libs/libcodeblocks.so -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8 -lpthread -ldl -Wl,--rpath -Wl,/usr/local/lib
app.o: In function `CodeBlocksApp::GetAppPath() const':
/media/SHAREDDATA/CodeBlocks/src/src/app.cpp:839: undefined reference to `wxString::wxString(char const*, wxMBConv&, unsigned int)'
app.o: In function `wxFont':
/usr/include/wx-2.6/wx/gtk/font.h:37: undefined reference to `wxFont::Init()'
/usr/include/wx-2.6/wx/gtk/font.h:37: undefined reference to `wxFont::Init()'
app.o: In function `CodeBlocksApp::OnInit()':
/media/SHAREDDATA/CodeBlocks/src/src/app.cpp:457: undefined reference to `wxZipFSHandler::wxZipFSHandler()'
app.o: In function `FileLogger::Append(wxString const&, Logger::level)':
../../src/include/logger.h:64: undefined reference to `wxString::mb_str(wxMBConv&) const'
../../src/include/logger.h:64: undefined reference to `wxString::mb_str(wxMBConv&) const'

#...and in fact, I just get hundreds of similar 'undefined reference' errors. Note that make still seems to be looking for wx2.6 which is very confusing.

[Edit...] Oops... forgot to do a 'make clean' before starting the new make. After cleaning out the old make, the new one seems to be going a lot better (!)
« Last Edit: October 16, 2007, 08:02:12 pm by johne53 »

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Settings don't get saved (svn 4454)
« Reply #66 on: October 16, 2007, 08:09:29 pm »
which version of wxWidgets is used by wx-config as standard ?
Code: [Select]
wx-config --versionshould answer "2.8.4" .
If not you can change the default  version wx-config uses by typing
Code: [Select]
update-alternatives --config wx-configThe answer is something like
Code: [Select]
Es gibt 6 Alternativen, die wx-config bereitstellen.

  Auswahl      Alternative
-----------------------------------------------
          1    /usr/lib/wx/config/base-unicode-debug-2.8
          2    /usr/lib/wx/config/gtk2-unicode-debug-2.8
          3    /usr/lib/wx/config/base-unicode-release-2.8
*+        4    /usr/lib/wx/config/gtk2-unicode-release-2.8
          5    /usr/lib/wx/config/base-unicode-release-2.6
          6    /usr/lib/wx/config/gtk2-unicode-release-2.6

Drcken Sie die Eingabetaste, um die Vorgabe[*] beizubehalten,
oder geben Sie die Auswahlnummer ein: 

Sorry it's german, and I don't have any english locales on my laptop.
You can than select the default version for wx-config.
On my laptop it's "/usr/lib/wx/config/gtk2-unicode-release-2.8" .

On debian systems, after running the bootstrap-script you can type "dpkg-buildpackage" from the commandline (you must be in the directory with the "debian" subdirectory), or if you are not root try "fakeroot dpkg-buildpackage".
If "dpkg-buildpackage" says something about missing dependencies you have to install the missing packages. If "libstdc++6-4.0-dev" is missing, but you have "libstdc++6-4.1-dev" installed, that doesn't matter.
Install the other packages and run
Code: [Select]
dpkg-buildpackages -d.
This overrides dependency-checking. So make sure all packages you need are installed. Instead of the "-d"-option, you can patch the "debian/control"-file:
in line 5 change "libstdc++6-4.0-dev" to "libstdc++6-4.1-dev".
Or you can use the source-package from my repository (but it's svn 4537 in the moment).
If all works correctly you should have your own build codeblocks ".deb"-packages in the directory one step higher than your working directory.
You can install them with
Code: [Select]
dpkg -i path_to_package_file/package_file.deb.
For example, when you compiled svn4537 and are still in the working-directory of codeblocks type
Code: [Select]
dpkg -i codeblocks_1.0svn4537_i386.deb ../codeblocks-contrib_1.0svn4537_i386.deb ../libcodeblocks0_1.0svn4537_i386.deb ../libwxsmithlib0_1.0svn4537_i386.deb
The -dev and -dbg packages are normally not needed, if you don't want to develop youre own plugins, or debug codeblocks itself.

So, this is pretty much stuff, but I hope it helps.
Now i bring my son in the bed and than look for an answer. :D

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Settings don't get saved (svn 4454)
« Reply #67 on: October 16, 2007, 08:19:45 pm »
Sorry, it looks like our posts coincided. The problem was just that I'd forgotten to clean out the old (incomplete) build. Having done that, C:B has finally built & installed correctly. I'll be testing it again tomorrow. Wish me luck...  :D

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Settings don't get saved (svn 4454)
« Reply #68 on: October 16, 2007, 08:57:02 pm »
Sorry, it looks like our posts coincided. The problem was just that I'd forgotten to clean out the old (incomplete) build. Having done that, C:B has finally built & installed correctly. I'll be testing it again tomorrow. Wish me luck...  :D

I saw just after clicking the "Post"-button.

Nevertheless I hope it works for you.  :D

I think you should try the "debian-way" and use "dpkg-buildpackage" or if you have source-code that is not yet "debianized" you can use "checkinstall" (apt-get install checkinstall).
If you do so you can deinstall packages much easier, if something went wrong.

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Settings don't get saved (svn 4454)
« Reply #69 on: October 18, 2007, 11:02:54 am »
After 2 days I've finally managed to build C::B and load the project that was giving me the segfaults. Unfortunately, it's still giving me segfaults - even though I'm now running a fresh build on a new PC with a different Linux distro.   :( However, I've discovered something very interesting....

When I first built C::B it initialised a file for me called default.conf. If I use that original configuration file, I don't get the segfaults. However, if I start adding global search directories, the segfaults happen pretty much every time I shut down C::B.

This is what the gcc section of my config file looked like before I added any search directories:-
Code: [Select]
<gcc>
<NAME>
<str>
<![CDATA[GNU GCC Compiler]]>
</str>
</NAME>
<INCLUDE_DIRS>
<str>
<![CDATA[/usr/include;]]>
</str>
</INCLUDE_DIRS>
<RES_INCLUDE_DIRS>
<str>
<![CDATA[/usr/include;]]>
</str>
</RES_INCLUDE_DIRS>
<LIBRARY_DIRS>
<str>
<![CDATA[/usr/lib;]]>
</str>
</LIBRARY_DIRS>
<MASTER_PATH>
<str>
<![CDATA[/usr]]>
</str>
</MASTER_PATH>
</gcc>


The above is how the file looked when it was originally configured by C::B. Here's how the same section looks, after I've added some compiler and linker search directories:-
Code: [Select]
<gcc>
<NAME>
<str>
<![CDATA[GNU GCC Compiler]]>
</str>
</NAME>
<INCLUDE_DIRS>
<str>
<![CDATA[/usr/include/;/opt/gnome/include/glib-2.0/;/opt/gnome/lib/glib-2.0/include/;$(#base)/ardour2/libs/glibmm2/;$(#base)/ardour2/libs/gtkmm2/atk/;$(#base)/ardour2/libs/gtkmm2/gtk/;$(#base)/ardour2/libs/gtkmm2/gdk/;$(#base)/ardour2/libs/gtkmm2/pango/;$(#base)/ardour2/libs/libgnomecanvasmm/;$(#base)/ardour2/libs/sigc++2/;$(#base)/ardour2/libs/pbd/;$(#base)/ardour2/libs/ardour/;$(#base)/ardour2/libs/;$(#base)/ardour2/;$(#base)/ardour2/libs/midi++2/;$(#base)/ardour2/libs/surfaces/control_protocol/;$(#base)/ardour2/libs/gtkmm2ext/;$(#base)/ardour2/gtk2_ardour/;$(#base)/CodeBlocks/src/include/wxscintilla/include/;/usr/include/wx-2.8/;/usr/include/atk-1.0/;/usr/include/gtk-2.0/;/usr/include/glib-2.0/;/usr/include/pango-1.0/;/usr/include/libgnomecanvas-2.0/;/usr/lib/glib-2.0/include/;/usr/lib/gtk-2.0/include/;/usr/lib/wx/include/gtk2-unicode-release-2.8/;]]>
</str>
</INCLUDE_DIRS>
<RES_INCLUDE_DIRS>
<str>
<![CDATA[/usr/include;]]>
</str>
</RES_INCLUDE_DIRS>
<LIBRARY_DIRS>
<str>
<![CDATA[$(#output)/ardour2/;/usr/lib;/usr/lib/cups/backend;/opt/gnome/lib;$(#base)/ardour2/libs/;]]>
</str>
</LIBRARY_DIRS>
<MASTER_PATH>
<str>
<![CDATA[/usr]]>
</str>
</MASTER_PATH>
</gcc>

With this second configuration I get segfaults almost every time I exit C::B (and any changes that I've made to the global settings get lost). Can anyone see anything obviously wrong in the updated config file?

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Settings don't get saved (svn 4454)
« Reply #70 on: October 21, 2007, 10:57:31 am »
Well Ive provided quite a lot of information on this problem now, so can I assume from the lack of response that my postings dont seem to show anything obviously wrong?

Reluctantly Ive had to conclude that C::B isnt yet suited to complicated projects like the type Im working with. In this particular case I could probably break the project down into smaller sub-projects and Im fairly confident that this would eventually make the problem go away. However I can envisage situations in the future where it simply wont be possible to break up projects like this.

Before I give up on C::B is there any developer whod like to receive a copy of this project to see if they can reproduce (and hopefully fix) the problem? Ive reproduced it myself with 2 separate builds of C::B installed on different PCs with different distributions of Linux. Therefore hopefully, it will be easy to replicate on somebody elses system. If I were to include all the source modules it would come to around 600MB (uncompressed) so Id probably need to supply it on CD ROM.

Thanks to everyone for trying to help.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Settings don't get saved (svn 4454)
« Reply #71 on: October 21, 2007, 01:47:27 pm »
Two questions and a suggestion:

Q1: You are talking about default.conf and adding search paths. Do I understand you are editing that config file manually?

Q2: Have you tried disabling the code completion plugin? Code completion uses the search path information to <don't actually know what it does>. Thus, if changing search paths causes a crash, then CC is one easy thing that can be ruled out by disabling the plugin.

Suggestion: If you want someone to look at the project, it would probably be easiest to make a tarball of the whole source tree and provide a download URL. If it's sources and gzipped, those 600 MB should be no more than maybe 200-250 MB packed, that's 3-4 minutes of download time, no big issue (remember that this forum can be read by a million people, though... so only do this if your sources are really meant to be open).
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Settings don't get saved (svn 4454)
« Reply #72 on: October 21, 2007, 02:20:23 pm »
Q1: You are talking about default.conf and adding search paths. Do I understand you are editing that config file manually?
No - I extracted the above text just so people can see what kinds of thing are causing this problem but in fact, I'm adding my search paths from within C::B. I just wanted to know if there's anything wrong about the way I'm typing the path names. For example, can I (as I have done) use global variables there? And does it matter whether or not the path names end in a forward slash? That sort of thing.


Q2: Have you tried disabling the code completion plugin?
AFAIK it's not enabled (unless it's enabled by default). I haven't personally installed or enabled any plug-ins.


Suggestion: If you want someone to look at the project, it would probably be easiest to make a tarball of the whole source tree and provide a download URL. If it's sources and gzipped, those 600 MB should be no more than maybe 200-250 MB packed, that's 3-4 minutes of download time, no big issue
Thanks for the suggestion, Thomas - but the bottleneck would be my upload speed. My broadband connection only offers around 256Kb upload speed so to place the code on a suitable URL would take me around 6 hours (and that's assuming that nothing goes wrong...!)

Would the workspace and projects be of any use without my source files? That would make it a lot simpler.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Settings don't get saved (svn 4454)
« Reply #73 on: October 21, 2007, 02:53:16 pm »
Q2: Have you tried disabling the code completion plugin?
AFAIK it's not enabled (unless it's enabled by default). I haven't personally installed or enabled any plug-ins.

Yes, it's enabled by default.
You can disable it under "Plugins -> Manage Plugins" .

You have "/opt" in your include-dirs. Where did you download the packages from ? Normally "/opt" should not be used under debian afaik. Try to use only packages that belong to your debian-distribution (e.g. libglib2.0-dev).
You also have very much include-paths pointing to ardours-subdirs. Is it a development-version of ardour2 or just the source-code?
Are you sure that no header-files with the same name exist in more than one of the include-dirs?

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Settings don't get saved (svn 4454)
« Reply #74 on: October 21, 2007, 06:08:45 pm »
Jens - don't worry too much about the presence of /opt - it's simply a leftover from the fact that I was originally running under OpenSuse. In any case....


Thomas
- you've had a real flash of inspired genius with that suggestion about the Code Completion plug-in. Disabling it makes the problem go away on both machines. Re-enabling it makes the problem come back on both machines. I think you might have found the cause!

In fact, here's something interesting I discovered whilst messing about with all this.... it so happens that the first of my compiler (global) search directories is /usr/include/  Suppose I have the CC plugin enabled and I change that entry to usr/include/ (in other words, I delete that initial forward slash). Save this. Shut down C::B and re-start it. Now go to Manage Plugins and attempt to disable the CC plugin. On my machines (currently running SVN 4475) this will cause the Manage Plugins window to consistently crash, producing the error Xlib: unexpected async reply (sequence 0xd426)!

Looks like there might be something flaky in that part of the code.