Help needed , debugger , linux(Ubuntu 8.04)

Linux specific forum
massi
User
User
Posts: 10
Joined: Wed Jul 16, 2008 11:08 pm
Location: Italy

Help needed , debugger , linux(Ubuntu 8.04)

Post by massi »

Hi everybody,
I'm utterly new to this forum and I hope this is the right place to this thread. I'm looking for a cross platform (Win/Linux) basic language for developing scientific software.
Among the others, I'm now trying to learn the basis of PB.
While in WinXP everything looks fine, in Ubuntu 8.04 I get an error every time I try to run a program with the debugger. Instead, if I switch the debugger off, the program runs fine.
Did anyone else find and fix this - probably trivial - problem?
Second, is the Visual Design alpha, the only native working designer for Linux?

Thanks everybody,

Massi
[edit byy Rings, set subject ]
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

There is a confirmed problem with the debugger on kubuntu 8.04. I am working on that.
As a workaround, the debugger seems to work when run from a root account for the moment.
Are you running kubuntu or another flavor of ubuntu ?

About the Visual Designer: Yes, the alpha is the only version for Linux so far.
quidquid Latine dictum sit altum videtur
massi
User
User
Posts: 10
Joined: Wed Jul 16, 2008 11:08 pm
Location: Italy

Post by massi »

I'm running Ubuntu 8.04 with (Gnome DE). I get a "Linker error" window with a message complaining about "gcc:/usr/... .out not found"
Little John
Addict
Addict
Posts: 4777
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Post by Little John »

Buon giorno massi. ;)

What do you exactly mean?
As far as I understood, PB has got three debuggers. Do you mean the debugger which is integrated in the IDE? When I run some simple code such as

Code: Select all

Debug 5+9
the debugger window correctly shows 14, without any error message or something.
My system is Ubuntu 8.04 with Gnome desktop. All current updates installed, no special configuration.
Can you post a small but complete code snippet that causes the problem on your system?

Regards, Little John
massi
User
User
Posts: 10
Joined: Wed Jul 16, 2008 11:08 pm
Location: Italy

Post by massi »

Let's suppose I open PB and type the program debug 5+9, as suggested by Little John.
When I press F5, I get a new window, entitled "Linker error" and stating "gcc:/tmp/purebasic_compilation0.out: no file or directory"
If I switch off the Debugger, no error message appears, but obviously I don't get anything.
Now let's pass to a more complex (!) program

Code: Select all

Global Window_0, Text_0, Button_0
Procedure Open_Window_0()
  Window_0 = OpenWindow(#PB_Any, 5, 5, 400, 200, "Window 0",  #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar )
  If Window_0
    If CreateGadgetList(WindowID(Window_0))
      Text_0 = TextGadget(#PB_Any, 100, 40, 200, 47, "Hello World!", #PB_Text_Center)
    EndIf
  EndIf
EndProcedure
Open_Window_0()
Repeat
  Event  = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
End
When I run it with the Debugger on, I get the same error window as before. If I disable the debugger, the desired window appears and the program runs until I close the windows.
As far as gcc is concerned, in my pc I've installed the versions 3.3, 3.4 and 4.2 (packages gcc-x.y and gcc-x.y-base).
Thank you eveybody.
All the best,

Massi

[edit by Rings, set codetags ]
Little John
Addict
Addict
Posts: 4777
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Post by Little John »

Massi, I assume you are using the current version PureBasic 4.20, do you? Maybe the Linker doesn't have the required rights to write to that directory?
How did you install PureBasic?
I had just extracted the PureBasic archive to the directory /opt/purebasic.

Regards, Little John
massi
User
User
Posts: 10
Joined: Wed Jul 16, 2008 11:08 pm
Location: Italy

Post by massi »

My version is 4.20 (demo). I installed it to /opt/purebasic (starting from the tarball) , and modified my .cshrc file (I'm used to tcsh) like this:

setenv PUREBASIC_HOME /opt/purebasic
set path = ($PUREBASIC_HOME $path )
set path = ($PUREBASIC_HOME/compilers $path )

Finally, when running /opt/purebasic/compilers/purebasic as a superuser, I get the same behavior as when I access as a normal user.
Best,

Massi
massi
User
User
Posts: 10
Joined: Wed Jul 16, 2008 11:08 pm
Location: Italy

Post by massi »

I just tried to install pb (always from the tarball - 25 may) in another ubuntu 8.04 pc in my office.
I got exactly the same problem as at home...
Little John
Addict
Addict
Posts: 4777
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Post by Little John »

Since you get the same problem as superuser, it is not the known problem that Freak mentioned.
It's strange that it works fine on my system, but not on your systems. If we only could find out what the difference between the systems is, then we'd have a clue.

Regards, Little John
massi
User
User
Posts: 10
Joined: Wed Jul 16, 2008 11:08 pm
Location: Italy

Post by massi »

Dear LJ,
could you please let me know which version of gcc is installed on your ubuntu system? Have you f77 installed as well?
Thanx,

Massi
Little John
Addict
Addict
Posts: 4777
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Post by Little John »

Hi,

according to the list in Synaptic, besides other stuff this is installed on my system
gcc
gcc-3.3
gcc-3.3-base
gcc-4.2
gcc-4.2-base
gcj-4.2-base
libgcc1
I'm pretty new to Linux, so I don't know whether it's necessary to have gcc-3.3 installed, when gcc-4.2 is installed, too.

Searching for f77 in Synaptic, the matching entries are
libcnf-dev
libextutils-f77-perl
Both packages are not installed here.

When I had installed PB on Linux, I stumbled across the issue that the packages which are required by PB, have different names on different Linux distributions. I tried to "translate" the information from the Readme file:
README file of PB 4.20 for Linux wrote:Requierement:
-------------
- gcc
- GTK+ 2.0 devel (and optionally GTK+ 1.2 devel for old application support)
- SDL 1.2 devel
- libstdc++ devel
- iodbc and iodbc-devel to be able to use the Database commands (see www.iodbc.org)
- libgtkembedmoz.so shoud be installed to have the WebGadget() working (comes with the Mozilla package).
Once the Mozilla package is installed, you could have to do an ldconfig after have added the right path
(/usr/lib/mozilla.x.x) to /etc/ld.so.config.
- xine and xine-devel for the Movie commands
- libgnomeprintui2.2 and libgnomeprintui2.2-devel for the print commands
As far as I can see, on Ubuntu 8.04 the names of the mentioned packages/files are:
- gcc
- libgtk2.0-dev
- libsdl1.2-dev
- libstdc++6-4.2-dev
- libiodbc2 (?) and libiodbc2-dev (?)
- libgtkembedmoz.so
- libxine1 and libxine-dev
- libgnomeprintui2.2-0 and libgnomeprintui2.2-dev
Maybe this is useful for you (or someone else). Due to my limited knowledge of Linux, there may be mistakes in the above list. Anyway, the listed packages are installed here, and PB 4.20 runs fine.

I hope this is a little helpful for you,

Regards, Little John
massi
User
User
Posts: 10
Joined: Wed Jul 16, 2008 11:08 pm
Location: Italy

Post by massi »

Hmm... there seems not to be any problems with dependencies, and the checkinstall script confirms everything should be fine...
Is there anyone who knows about the purebasic_compilation1.out file? Is it related with the debugger? Where should I find it?

Thank you to everybody for the patience...

Best,

Massi
Rick
User
User
Posts: 16
Joined: Thu Sep 23, 2004 6:25 am
Location: Portland, Oregon, USA

Post by Rick »

I'm running PB 4.20 (x86 Linux) under Ubuntu 8.04 Hardy.

In PB, under Compiler > Compiler Options > Compile/Run I have checked "Create temporary executable in the source directory".

This creates a "purebasic_compilation#.out" file in the same directory where I'm editing the PB source code. As a normal user logged in, I am editing the source code and saving with no error. I know I don't have to worry about a permission error with PB writing someplace else.
massi
User
User
Posts: 10
Joined: Wed Jul 16, 2008 11:08 pm
Location: Italy

Post by massi »

This seems not to fix my problem. In fact, I continue to get the message:

gcc:// (starting directory) /purebasic_compilation0.out: No file or directory

:(
Rick
User
User
Posts: 16
Joined: Thu Sep 23, 2004 6:25 am
Location: Portland, Oregon, USA

Post by Rick »

In PB, under File > Preferences and then Editor > Defaults, do you have anything set in the "Current Directory" field?

On my installation, I leave this blank.
Post Reply