Ubuntu 16 - dependancies?

Linux specific forum
User avatar
Shardik
Addict
Addict
Posts: 1989
Joined: Thu Apr 21, 2005 2:38 pm
Location: Germany

Re: Ubuntu 16 - dependancies?

Post by Shardik »

I have installed the libraries with the console commands Oma has posted (you really should have taken a look into my postings Oma had already linked above where I already described which libraries to install on the older Linux Mint 17 x86 "Qiana" with Cinnamon and several other distributions) on the current
- Linux Mint 17.3 x86 "Rosa" with Cinnamon
- Ubuntu 16.04 x86 with Unity
and afterwards my small test program worked like a charm playing both the mpg and avi files in PureBasic... :wink:

On my Ubuntu 16.04 only libxine2-x was necessary (the other libraries were already installed) but it doesn't hurt to execute all 4 install commands.
User avatar
minimy
Enthusiast
Enthusiast
Posts: 344
Joined: Mon Jul 08, 2013 8:43 pm

Re: Ubuntu 16 - dependancies?

Post by minimy »

Oma wrote:Hello again, minimy!

Had my coffee too, and now Mint 17.3 :wink: .
I did the installations (mentioned in the link above) and now it runs (only tested with 1 mpg)
Please try:
sudo apt-get install mesa-vdpau-drivers
sudo apt-get install libxine2-dev
sudo apt-get install libxine2-x
sudo apt-get install libxine2
and good luck.
Best Regards, Charly
Hello Oma, wellcome to coffee club! :lol:
Thank for help with coffees, sorry.. :mrgreen: movies, I go to buy more coffee and try again over a clean installation of milk, sorry.. Mint. :lol:
Are you working with Vbox or real computer?.
Come back soon!
If translation=Error: reply="Sorry, Im Spanish": Endif
Oma
Enthusiast
Enthusiast
Posts: 312
Joined: Thu Jun 26, 2014 9:17 am
Location: Germany

Re: Ubuntu 16 - dependancies?

Post by Oma »

Only real hardware (with the exception of coffee :wink: )!
PureBasic 5.4-5.7, Linux: (X/L/K)Ubuntus+Mint - Windows XP (32Bit)
PureBasic Linux-API-Library & Viewer: http://www.chabba.de
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: Ubuntu 16 - dependancies?

Post by heartbone »

For those interested, I'm running UBUNTU 16.04 x64. as the primary OS and per checkinstall.sh I first executed:

Code: Select all

sudo apt-get install gcc g++ libc6-dev libsdl1.2-dev libgtk-3-dev unixodbc-dev libgnome2-dev libxine2-dev libxxf86vm-dev
Then from Oma's suggestion: http://www.purebasic.fr/english/viewtop ... 33#p489033 I ran:

Code: Select all

sudo apt-get install libxine2-x libxine2
From mk-soft's suggestion: http://www.purebasic.fr/english/viewtop ... 88#p488688 I ran:

Code: Select all

sudo apt-get install libgtk2.0-dev libsdl2-dev libwebkitgtk-dev libwebkitgtk-3.0-dev libwebkit2gtk-4.0-dev
mesa-vdpau-drivers & build-essential were already the newest version (12.1ubuntu2).

Then executing Shardik's example code: http://www.purebasic.fr/english/viewtop ... 71#p458371

The playback starts and the code abends on line 27

Code: Select all

(line 27) Until WaitWindowEvent() = #PB_Event_CloseWindow
[05:57:45] Waiting for executable to start...
[05:57:45] Executable type: Linux - x64 (64bit, Unicode)
[05:57:45] Executable started.
[05:57:47] [ERROR] PlayMovie.pb (Line: 27)
[05:57:47] [ERROR] Program aborted. (by external library)
[05:58:28] [WARNING] PlayMovie.pb (Line: 27)
[05:58:28] [WARNING] Gdk (WARNING): purebasic_compilation0.out: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.
[05:58:30] The debugged executable quit unexpectedly.

So I rebooted.
During the first program execution after reboot I got this error:

[06:08:47] Waiting for executable to start...
[06:08:47] Executable type: Linux - x64 (64bit, Unicode)
[06:08:47] Executable started.
[06:08:57] [WARNING] PlayMovie.pb (Line: 24)
[06:08:57] [WARNING] Gdk (ERROR): The program 'purebasic_compilation0.out' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
(Details: serial 304 error_code 8 request_code 1 (core protocol) minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the GDK_SYNCHRONIZE environment
variable to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
[06:08:59] The debugged executable quit unexpectedly.

I then ran it again:

[06:10:23] Waiting for executable to start...
[06:10:23] Executable type: Linux - x64 (64bit, Unicode)
[06:10:23] Executable started.
[06:10:25] [ERROR] PlayMovie.pb (Line: 27)
[06:10:25] [ERROR] Program aborted. (by external library)
[06:11:06] [WARNING] PlayMovie.pb (Line: 27)
[06:11:06] [WARNING] Gdk (WARNING): purebasic_compilation0.out: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.
[06:11:08] The debugged executable quit unexpectedly.

The movie started playing and once again, after the movie completed the messages at 6:11:06 were generated.

I built an executable and it fails with no feedback when executed from the desktop.
So I created a script to execute it and here's the result as reported to the terminal

Code: Select all

$ ./playmovie.sh
Failed to open VDPAU backend libvdpau_va_gl.so: cannot open shared object file: No such file or directory
vo_vdpau: Can't create vdp device : No vdpau implementation.
[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
playmovie: ../../src/xcb_io.c:179: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.
./playmovie.sh: line 3:  2451 Aborted                 (core dumped) ~/Desktop/playmovie
Run from a script, for a split second the executable actually opened the movie's window and seemed to play the first frame (with sound), then bam!
Keep it BASIC.
User avatar
minimy
Enthusiast
Enthusiast
Posts: 344
Joined: Mon Jul 08, 2013 8:43 pm

Re: Ubuntu 16 - dependancies?

Post by minimy »

I have video using a 'retro tip'.. (and more coffee too..)
PB 5.42 finally i surrended and not work video, why? is another of the grand misterys of the life. (Like cofee with milk) Who invented this?, Is patented? :wink:
But if use 5.0 work relative good..
Some times have an error.. like cofee without sugar.. :mrgreen:

Code: Select all

sudo apt-get more cofee
:lol: .oO(Dont write this, is only a joke.. after cofees.. :mrgreen: )
If translation=Error: reply="Sorry, Im Spanish": Endif
User avatar
Frarth
Enthusiast
Enthusiast
Posts: 241
Joined: Tue Jul 21, 2009 11:11 am
Location: On the planet
Contact:

Re: Ubuntu 16 - dependancies?

Post by Frarth »

The problem may be with the MATE desktop. I tried LinuxMint 17 (is Ubuntu 14.04) with the MATE desktop and encountered several problems with development tools, not just Purebasic but also Lazarus and Realbasic.

In the purebasic documentation I read that Purebasic still uses gtk2 (may be out-dated). However, importing gtk3 libraries work as well, as I demonstrated here: http://www.purebasic.fr/english/viewtop ... 15&t=65951

GTK warning errors are usually desktop and theme related, so choosing the right desktop with a stable theme is essential (I managed to crash the PB IDE by switching themes while PB was running).

That being said, I found that the XFCE desktop is the best choice if you want to do programming on Linux with Purebasic. Yesterday I installed Xubuntu 16.04 which is Ubuntu with the XFCE desktop. I installed Purebasic 5.41 LTS with the required dependencies. I ran a few projects and found no problems.

Be sure to use a pre-installed theme like Greybird. It usually works best. You can install any xfwm window decoration. I installed the glossy XubuntuStudio from xfce-looks.org.

If you really want to use MATE you better go back to Debian 7 (wheezy) based distros with MATE 1.8 desktop. It is what I used before switching to XFCE.

I hope this helps.
Last edited by Frarth on Sat Jun 18, 2016 8:21 am, edited 1 time in total.
PureBasic 5.41 LTS | Xubuntu 16.04 (x32) | Windows 7 (x64)
User avatar
Keya
Addict
Addict
Posts: 1891
Joined: Thu Jun 04, 2015 7:10 am

Re: Ubuntu 16 - dependancies?

Post by Keya »

i currently leave the subsystem field empty or whatever the default is (im guessing that it defaults to gtk2 ?)
My question as a nix newbie is: should I just keep doing that, or are there particular reasons i should start using gtk3 from now on instead, or...? thanks
User avatar
Frarth
Enthusiast
Enthusiast
Posts: 241
Joined: Tue Jul 21, 2009 11:11 am
Location: On the planet
Contact:

Re: Ubuntu 16 - dependancies?

Post by Frarth »

Keya wrote:i currently leave the subsystem field empty or whatever the default is (im guessing that it defaults to gtk2 ?)
My question as a nix newbie is: should I just keep doing that, or are there particular reasons i should start using gtk3 from now on instead, or...? thanks
Not sure what you mean by leaving the subsystem field empty. Most distros have both gtk2 and gtk3 libraries installed. So technically you can use either one of them depending on what your development tools support or on the bindings you use. However, you cannot use both in the same process.

From what I can tell Purebasic uses gtk3 for its gadgets because if you run a pb compiled program on a gtk2 theme in XFCE the widgets/gadgets look 'ugly' meaning the gtkrc definitions are being ignored. Therefore, on XFCE you need a stable theme with both gtk2 and gtk3 definitions. Only few themes actually support this and while theme related gtk warning errors seem harmless, they actually may cause your program interface to misbehave.
PureBasic 5.41 LTS | Xubuntu 16.04 (x32) | Windows 7 (x64)
User avatar
Frarth
Enthusiast
Enthusiast
Posts: 241
Joined: Tue Jul 21, 2009 11:11 am
Location: On the planet
Contact:

Re: Ubuntu 16 - dependancies?

Post by Frarth »

Another tip to prevent stability / conflict issues on Linux systems: Don't use backport repositories as they're unsupported.

Xubuntu comes shipped with the gnome-software-center. You may want to use Synaptic instead which gives you more control over the software packages.

To install Synaptic:

Code: Select all

$ sudo apt-get install synaptic
To add a search box to Synaptic:

Code: Select all

$ sudo apt-get install apt-xapian-index
$ sudo update-apt-xapian-index -vf
Once installed, fire up synaptic, either from the terminal or from Menu -> System -> Synaptic. Once there go to Settings -> Repositories and select the 'Update' tab. Uncheck 'Unsupported updates (backports)' and close the window. You will be asked to reload the package information.

While in Synaptic hit the 'Status' button. Above you may see a section with packages that can be upgraded. Just hit the Mark All Upgrades button and then the Apply button to upgrade your system to the latest software (but without the backports).

From Synaptic you can also uninstall the gnome-software-center if you don't use it.
Last edited by Frarth on Fri Jun 24, 2016 8:49 am, edited 1 time in total.
PureBasic 5.41 LTS | Xubuntu 16.04 (x32) | Windows 7 (x64)
User avatar
Shardik
Addict
Addict
Posts: 1989
Joined: Thu Apr 21, 2005 2:38 pm
Location: Germany

Re: Ubuntu 16 - dependancies?

Post by Shardik »

Keya wrote:i currently leave the subsystem field empty or whatever the default is (im guessing that it defaults to gtk2 ?)
Beginning with PB 5.40 the default is GTK3:
News log for PB 5.40 wrote:- Changed: The default GTK version is now GTK3 on Linux. A gtk2 subsystem has been added for backward compatibility.
User avatar
Frarth
Enthusiast
Enthusiast
Posts: 241
Joined: Tue Jul 21, 2009 11:11 am
Location: On the planet
Contact:

Re: Ubuntu 16 - dependancies?

Post by Frarth »

Ah, there's my confusion. I was thinking Linux setting, not PB setting. Yes, I also have the Library Subsystem field empty. ;)
PureBasic 5.41 LTS | Xubuntu 16.04 (x32) | Windows 7 (x64)
Post Reply