This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 246757 - C on Linux does not recognize the Position Independent Executable files
Summary: C on Linux does not recognize the Position Independent Executable files
Status: RESOLVED WONTFIX
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 8.0.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-28 16:08 UTC by StephenReed
Modified: 2017-03-31 12:38 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description StephenReed 2014-08-28 16:08:53 UTC
When executing the debugger in a C++ project, I had to copy the executable, i.e. bitcoin-qt, to have a .exe file extension, i.e. bitcoin-qt.exe in order for the dialog box to recognize the file as an executable file.
Comment 1 Alexander Simon 2014-08-28 18:03:07 UTC
Please provide additional info:
- Platform
- executable
Comment 2 Alexander Simon 2014-08-29 06:29:59 UTC
Waiting for details...
Comment 3 Alexander Simon 2014-08-29 06:58:32 UTC
Probably you mean file "bitcoin-0.9.2.1-linux/bin/64/bitcoin-qt" in:
https://bitcoin.org/bin/0.9.2.1/bitcoin-0.9.2.1-linux.tar.gz
?
Comment 4 soldatov 2014-08-29 08:55:19 UTC
"How to make executable shared libraries" article:
http://rachid.koucha.free.fr/tech_corner/executable_lib.html
Comment 5 soldatov 2014-08-29 10:21:25 UTC
In bitcoin's bug tracker I see such closed issue: https://github.com/bitcoin/bitcoin/issues/3847
Comment 6 soldatov 2014-08-29 10:27:39 UTC
"g++ -fPIC -pie -o test test.cpp" generates same executable (or shared library)
Comment 7 soldatov 2014-08-29 10:47:03 UTC
http://lfs.osuosl.org/hlfs/view/unstable/glibc/chapter02/pie.html
==========================================================================
 Position-Independent-Executable is a feature of Binutils, Libc, and GCC that creates an executable which is something between a shared library and a normal executable. Programs compiled with these features appear as “shared object” with the file(1) command. This allows the executable to behave like a shared library so base addresses can be relocatable. The PIE program must be linked to Scrt1.o. Scrt1.o is available from the newer versions of Libc. Furthermore these programs must be linked with the -pie ld(1) command from a Binutils version 2.15 or later. GCC supports this natively with the -fPIE switch in version 3.4 or later.

When all of the object code is position independent the kernel can disallow text relocation. This dramatically increases the security of the system with little performance loss. PaX and Grsec kernels have this option available though very few systems have been able to take advantage of it. The entire base system can be built position independent with the exception of the Grub boot loader, and Glibc's utilities due to non-pic assembly code. These programs will still function if they are dynamically linked. Other exceptions are X11 windowing system, Mplayer, and a few other graphical programs which were not programed with PIE in mind, this should come in time. Gzip uses assembly code which is not position independent, but this can be omitted at compile time and Gzip will use only C code.
==========================================================================
Comment 8 Maria Tishkova 2014-11-21 14:58:53 UTC
As a workaround to avoid copying I can suggest you to use launchersThe launchers are  documented in  the Netbeans C/C   help which is in the IDE's Help menu, not on the web.  See Help
Comment 9 Alexander Simon 2017-03-31 12:38:49 UTC
Use launcher for run/debug executable shared library.