|
|
Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » Problem Launching stable IDE on OpenBSD 4.8-stable
|
Re: Problem Launching stable IDE on OpenBSD 4.8-stable [message #32072 is a reply to message #32071] |
Wed, 20 April 2011 08:35   |
|
Hi Col. Builder,
Welcome to the forum 
Col. Builder wrote on Wed, 20 April 2011 05:39 | I had to tweak the uppsrc/Makefile to account for many of my headers and libraries being under /usr/local/include, /usr/local/lib.
|
I guess I can add those folders to the Makefile defaults to be more OpenBSD friendly...
As for the invalid memory access, it is hard to tell... Could you try to run it in debugger and post a backtrace when the error happens? (You might need to recompile theide with -g in CFLAGS and tweak the ar invocation in AR variable to get executable with debugging symbols...).
Also you could try to compile some simpler apps from examples/tutorial/reference directory, to see how deep the problem lays. E.g. wc (this one uses Core only) and Days (just basic GUI), both are in examples directory.
Meanwhile, I'll try to install OpenBSD in virtual machine to see if I can reproduce the problem...
Best regards,
Honza
|
|
|
|
Re: Problem Launching stable IDE on OpenBSD 4.8-stable [message #32085 is a reply to message #32072] |
Wed, 20 April 2011 23:01   |
Col. Builder
Messages: 7 Registered: April 2011
|
Promising Member |
|
|
dolik.rce wrote on Tue, 19 April 2011 23:35 | Hi Col. Builder,
Welcome to the forum 
Col. Builder wrote on Wed, 20 April 2011 05:39 | I had to tweak the uppsrc/Makefile to account for many of my headers and libraries being under /usr/local/include, /usr/local/lib.
|
I guess I can add those folders to the Makefile defaults to be more OpenBSD friendly...
As for the invalid memory access, it is hard to tell... Could you try to run it in debugger and post a backtrace when the error happens? (You might need to recompile theide with -g in CFLAGS and tweak the ar invocation in AR variable to get executable with debugging symbols...).
Also you could try to compile some simpler apps from examples/tutorial/reference directory, to see how deep the problem lays. E.g. wc (this one uses Core only) and Days (just basic GUI), both are in examples directory.
Meanwhile, I'll try to install OpenBSD in virtual machine to see if I can reproduce the problem...
Best regards,
Honza
|
Thanks for the welcome!
Here are the relevant lines of the makefile that I tweaked:
UPPOUT = _out/
CINC = \
-I./ \
-I/usr/local/include/freetype2 \
-I/usr/local/include/gtk-2.0 \
-I/usr/local/include/glib-2.0 \
-I/usr/local/lib/glib-2.0/include \
-I/usr/local/lib/gtk-2.0/include \
-I/usr/local/include/cairo \
-I/usr/local/include/pango-1.0 \
-I/usr/local/include/atk-1.0 \
-I/usr/local/include/gdk-pixbuf-2.0 \
-I/usr/local/include/gtk-2.0/gdk-pixbuf \
-I/usr/local/include/libpng \
\
-I/usr/include/freetype2 \
-I/usr/include/gtk-2.0 \
-I/usr/include/glib-2.0 \
-I/usr/lib/glib-2.0/include \
-I/usr/lib/gtk-2.0/include \
-I/usr/include/cairo \
-I/usr/include/pango-1.0 \
-I/usr/include/atk-1.0 \
-I/usr/include/gdk-pixbuf-2.0 \
-I/usr/include/gtk-2.0/gdk-pixbuf \
-I/usr/include/libpng \
\
-I/usr/X11R6/include \
-I/usr/X11R6/include/freetype2 \
-I/usr/X11R6/include/gtk-2.0 \
-I/usr/X11R6/include/glib-2.0 \
-I/usr/X11R6/lib/glib-2.0/include \
-I/usr/X11R6/lib/gtk-2.0/include \
-I/usr/X11R6/include/cairo \
-I/usr/X11R6/include/pango-1.0 \
-I/usr/X11R6/include/atk-1.0 \
\
-I/usr/local/include \
-I/usr/include
#Macro = -DflagGUI -DflagGCC -DflagSHARED -DflagLINUX -DflagPOSIX
Macro = -DflagGUI -DflagGCC -DflagSHARED -DflagOPENBSD -DflagPOSIX
CC = c++
LINKER = $(CC)
CFLAGS = -O3 -ffunction-sections -fdata-sections
CXXFLAGS = -O3 -ffunction-sections -fdata-sections
LDFLAGS = -Wl,--gc-sections $(LINKOPTIONS)
#LIBPATH = -L"/usr/X11R6/lib" -L"/usr/lib"
LIBPATH = -L"/usr/X11R6/lib" -L"/usr/lib" -L"/usr/local/lib"
I don't know if the changes to Macro are needed, but they seemed appropriate since I'm not running linux.
I'm not overly familiar with gdb/command-line-debugging, my experience comes from a long history ('89 to present) of IDE usage, mostly on Macs (Borland/Turbo C++, CodeWarrior, and a little bit of XCode). I might need a little bit to get up to speed on gdb. Hopefully I can get U++'s IDE up and running quickly on my system and I won't need to spend huge amounts of time on mastering the command-line before I can start doing some useful stuff. 
Anyway, I'll try to get a backtrace of the error. If I need to change the AR options, then I'll have to read up on that. So it might be a day or two before I can get back with one.
I'll also try building those other example projects you mentioned to see what gives.
(edited code section above to include changes to LIBPATH)
[Updated on: Wed, 20 April 2011 23:07] Report message to a moderator
|
|
|
Re: Problem Launching stable IDE on OpenBSD 4.8-stable [message #32086 is a reply to message #32085] |
Thu, 21 April 2011 07:36   |
|
Oh, I see, you are using the "release makefile" for theide (there is also one called "universal makefile", which compiles any package). The changes you did seem to be correct. I think you are just missing one more flag, BSD. The Macro variable should be something like Macro = -DflagGUI -DflagGCC -DflagSHARED -DflagBSD -DflagOPENBSD -DflagPOSIX
Hopefully this will result into correctly compiled theide, so you will not need to use the debugger 
Honza
|
|
|
Re: Problem Launching stable IDE on OpenBSD 4.8-stable [message #32094 is a reply to message #32086] |
Thu, 21 April 2011 23:19   |
Col. Builder
Messages: 7 Registered: April 2011
|
Promising Member |
|
|
dolik.rce wrote on Wed, 20 April 2011 22:36 | Oh, I see, you are using the "release makefile" for theide (there is also one called "universal makefile", which compiles any package). The changes you did seem to be correct. I think you are just missing one more flag, BSD. The Macro variable should be something like Macro = -DflagGUI -DflagGCC -DflagSHARED -DflagBSD -DflagOPENBSD -DflagPOSIX
Hopefully this will result into correctly compiled theide, so you will not need to use the debugger 
Honza
|
OK, I'm doing a clean rebuild using the extra flag, we'll see of it fixes things (fingers crossed).
Where can I find the "universal makefile"? Would I need to grab sources out of version control instead of a tarball to get ahold of it? I just downloaded a source tarball of the stable U++ and that's what I'm currently working with.
And it's not debuggers per-se that I'm trying to avoid, it's just command-line stuff that gives me the heebie-jeebies.
|
|
|
|
Re: Problem Launching stable IDE on OpenBSD 4.8-stable [message #32096 is a reply to message #32094] |
Fri, 22 April 2011 00:17   |
|
Hm, so it didn't help... Judging by the error message, it is something X related, but the message itself doesn't help much
Col. Builder wrote on Thu, 21 April 2011 23:19 | Where can I find the "universal makefile"? Would I need to grab sources out of version control instead of a tarball to get ahold of it? I just downloaded a source tarball of the stable U++ and that's what I'm currently working with.
|
The makefile is hidden in the SVN But don't worry, it can be easily retrieved from the google mirror: http://code.google.com/p/upp-mirror/source/browse/trunk/uppb ox/lpbuild/Makefile. As it's author, I must admit it is rather buggy lately... Also, I never tested it on OpenBSD (only on FreeBSD and Linux). If you decide to use it, note that it requires to be used with gmake. You can place it just about anywhere and then call (from within the same directory) like this:gmake PKG=ide FLAGS="GCC GUI SHARED OPENBSD" NESTS="/path/to/upp/uppsrc" You can also run just gmake or gmake help to see more about the options... Anyway, I guess that there is about 99% chance it will work the same or worse than the release makefile...
Honza
|
|
|
|
Re: Problem Launching stable IDE on OpenBSD 4.8-stable [message #32102 is a reply to message #32101] |
Sat, 23 April 2011 09:27   |
|
I guess OpenBSD sed behaves a little different than ferrBSD one...
I downloaded OpenBSD 4.8 to install it in VirtualBox, but for some reason it won't boot no matter what I do :-/ I'll try few more times over the weekend... but since than, I don't have nothing much to advice you 
Honza
|
|
|
|
|
Re: Problem Launching stable IDE on OpenBSD 4.8-stable [message #32111 is a reply to message #32107] |
Mon, 25 April 2011 14:14   |
|
Col. Builder wrote on Mon, 25 April 2011 03:29 | At least writing those per project/archive makefiles hasn't been a waste of time: I've been getting more familiar with the project layout/organization as a by-product. 
|
Do I understand correctly that you are using U++ without theide, just writing the makefiles by hand? If yes, you have my deep respect, I don't think anyone ever attempted to do that 
Now the bad news... I suspect the GCC to be actually the cause of the problems. On OpenBSD the gcc 4.2.1 is used by default, which is known to cause trouble with U++. So far I wasn't able to succesfully install any other compiler (tried gcc 3.3.6, but it reports missing cc1plus). LLVM/Clang is next option, but first I have to figure out how to build the version 2.8 from ports (because IIRC 2.9 doesn't work very well with U++)...
If you have a better understanding of OpenBSD internals than me (and I'm sure you do, I'm learning everything on the way ) you can try to use some other compiler yourself.
Honza
[Updated on: Mon, 25 April 2011 14:15] Report message to a moderator
|
|
|
Re: Problem Launching stable IDE on OpenBSD 4.8-stable [message #32113 is a reply to message #32071] |
Mon, 25 April 2011 16:09   |
|
Good news again! I have a running theide 
I'm just not sure yet what did the trick - I disabled a lot of things. So now I will start to enable them again one by one, checking what works and what not. This will take a while, the compilation in virtual machine takes quite some time. So for now, I will attach the makefile as is and update it later (probably tomorrow) in more optimal shape.
Honza
|
|
|
|
Re: Problem Launching stable IDE on OpenBSD 4.8-stable [message #32117 is a reply to message #32071] |
Mon, 25 April 2011 19:36   |
|
So, here is the final Makefile 
Actually all that was needed to be done was to use -O2 instead of -O3 optimizations...
Be aware, that theide compiled on OpenBSD suffers from the same bug as MacOS X version which causes the menus to be painted under the windows. To fix that change line 206 in uppsrc/CtrlCore/CtrlKbd.cpp from topwindow->SetWndForeground(); // cxl 2007-4-27 toif(activate) topctrl->SetWndForeground(); // cxl 2007-4-27
I also noticed (and had to correct) some compile errors in ndisasm plugin, but since you already compiled theide without noticing that, you probably don't need to fix that...
Hopefully, now you can finally enjoy a working theide 
Honza
-
Attachment: Makefile
(Size: 808.22KB, Downloaded 307 times)
|
|
|
|
Re: Problem Launching stable IDE on OpenBSD 4.8-stable [message #32194 is a reply to message #32192] |
Sat, 30 April 2011 05:00  |
|
Col. Builder wrote on Sat, 30 April 2011 02:25 | Now I just need to get used to the ide's organization (I'm a hardcore CodeWarrior guy, so TheIDE feels fairly alien at the moment), and also get llvm/clang working as the compiler (I know... probably very non-trivial)! 
|
It's not easy to get used to different IDE, but when you do, you will probably be quite happy with theide 
Setting up clang is piece of cake, at least version 2.8 (the newer 2.9 does not currently work with U++ ). You just make a copy of the GCC build method and change compiler name to "clang++" and it should work In worst case some include paths might be necessary to add, but that is still easy.
Honza
PS: More precisely: clang 2.9 doesn't work with libc4.6 headers, maybe it would work with libc4.5, but I haven't tried... Also the situation on OpenBSD might be different from my experience on Linux...
[Updated on: Sat, 30 April 2011 05:06] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Tue Apr 29 03:01:08 CEST 2025
Total time taken to generate the page: 0.14274 seconds
|
|
|