PB5.44 - PB 5.51B1 - Compiled program flagged as Shared lib

Linux specific forum
Fred
Administrator
Administrator
Posts: 16619
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PB5.44 - PB 5.51B1 - Compiled program flagged as Shared

Post by Fred »

Just wait :)
User avatar
Keya
Addict
Addict
Posts: 1891
Joined: Thu Jun 04, 2015 7:10 am

Re: PB5.44 - PB 5.51B1 - Compiled program flagged as Shared

Post by Keya »

is this the same issue?
http://askubuntu.com/questions/863267/c ... or-windows
im just wondering if its been reported to Ubuntu yet
nice work isolating the problem anyway Fred!
Fred
Administrator
Administrator
Posts: 16619
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PB5.44 - PB 5.51B1 - Compiled program flagged as Shared

Post by Fred »

User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: PB5.44 - PB 5.51B1 - Compiled program flagged as Shared

Post by StarBootics »

Still Unassigned ...

Very annoying but to me.

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
arma
User
User
Posts: 57
Joined: Sun Jul 24, 2016 11:54 pm

Re: PB5.44 - PB 5.51B1 - Compiled program flagged as Shared

Post by arma »

There is no news yet? Still waiting?
vwidmer
Enthusiast
Enthusiast
Posts: 282
Joined: Mon Jan 20, 2014 6:32 pm

Re: PB5.44 - PB 5.51B1 - Compiled program flagged as Shared

Post by vwidmer »

I am having this issue now anyone know a fix? I am on Arch linux using PB 5.60 x64 same on the LTS version
WARNING: I dont know what I am doing! I just put stuff here and there and sometimes like magic it works. So please improve on my code and post your changes so I can learn more. TIA
vwidmer
Enthusiast
Enthusiast
Posts: 282
Joined: Mon Jan 20, 2014 6:32 pm

Re: PB5.44 - PB 5.51B1 - Compiled program flagged as Shared

Post by vwidmer »

is this something that we can use? and if so how?

Code: Select all

You should add -no-pie option to compilation command line

without :

$ gcc main.c -o main

$ file main

main:ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=46ada4e5e25fc120ca052c9beb8bfa5491fc6239, not stripped

wtih :

$ gcc main.c -o main -no-pie

$ file main

main: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=17f860c6c84fc1a5771c8744b7aaaf164c219559, not stripped
thanks
WARNING: I dont know what I am doing! I just put stuff here and there and sometimes like magic it works. So please improve on my code and post your changes so I can learn more. TIA
vwidmer
Enthusiast
Enthusiast
Posts: 282
Joined: Mon Jan 20, 2014 6:32 pm

Re: PB5.44 - PB 5.51B1 - Compiled program flagged as Shared

Post by vwidmer »

found this not sure if its something as well why cant make executable files any more.

https://www.reddit.com/r/archlinux/comm ... lt_in_gcc/
WARNING: I dont know what I am doing! I just put stuff here and there and sometimes like magic it works. So please improve on my code and post your changes so I can learn more. TIA
arma
User
User
Posts: 57
Joined: Sun Jul 24, 2016 11:54 pm

Re: PB5.44 - PB 5.51B1 - Compiled program flagged as Shared

Post by arma »

Hello everybody,
I still can not use Ubuntu 17.04... :( I mean I can NOT create real executable. I just find one method, if change GCC version... But i have tons of new trouble on my Real Ubuntu System if i switch to old version of GCC, especially while update Ubuntu...
Is there any effective and real solution to create real executable way?
Thanks!
User avatar
Sicro
Enthusiast
Enthusiast
Posts: 538
Joined: Wed Jun 25, 2014 5:25 pm
Location: Germany
Contact:

Re: PB5.44 - PB 5.51B1 - Compiled program flagged as Shared

Post by Sicro »

vwidmer has published a workaround here:
http://www.purebasic.fr/english/viewtop ... 75#p509675
Image
Why OpenSource should have a license :: PB-CodeArchiv-Rebirth :: Pleasant-Dark (syntax color scheme) :: RegEx-Engine (compiles RegExes to NFA/DFA)
Manjaro Xfce x64 (Main system) :: Windows 10 Home (VirtualBox) :: Newest PureBasic version
Niffo
Enthusiast
Enthusiast
Posts: 500
Joined: Tue Jan 31, 2006 9:43 am
Location: France

Re: PB5.44 - PB 5.51B1 - Compiled program flagged as Shared

Post by Niffo »

I was not able to create an executable anymore on Linux since months too, the executable was seen as a shared library (Debian-9, PB 5.61 x64, PB 5.45 x64)

Code: Select all

ImportC "-no-pie" : EndImport
does the trick but is it a long therm solution ? Is not it purebasic to add that automatically? How are the newcomers doing?
Niffo
Saboteur
Enthusiast
Enthusiast
Posts: 271
Joined: Fri Apr 25, 2003 7:09 pm
Location: (Madrid) Spain
Contact:

Re: PB5.44 - PB 5.51B1 - Compiled program flagged as Shared

Post by Saboteur »

I had that problem in Ubuntu 17.04, but I changed recently to Zorin 12 and purebasic is working well. I think Zorin is based in Ubuntu, but perhaps the problem is fixed.
[:: PB Registered ::]

Win10 Intel core i5-3330 8GB RAM Nvidia GTX 1050Ti
deeproot
Enthusiast
Enthusiast
Posts: 269
Joined: Thu Dec 17, 2009 12:00 pm
Location: Llangadog, Wales, UK
Contact:

Re: PB5.44 - PB 5.51B1 - Compiled program flagged as Shared

Post by deeproot »

Small update on this issue - especially for anyone new or returning to Linux :

Problem is still relevant to Purebasic 5.46 LTS Beta 1, as well as 5.61, when compiling under Manjaro version 17.x (latest with all updates applied). Executables are flagged as Shared Library and cannot be directly launched from the file manager (Thunar). I'm guessing it would also be the case for the latest Arch Linux.

Workaround above fixes it, so annoying but easy to resolve!
Post Reply