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 253198 - Cannot run program "/tmp/dlight_ubuntu/.../.../pty"; error = 2. No such file or directory - armv7l - Ubuntu 14.04 LTS
Summary: Cannot run program "/tmp/dlight_ubuntu/.../.../pty"; error = 2. No such file ...
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Terminalemulator (show other bugs)
Version: 8.1
Hardware: Other Linux
: P3 normal (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
: 253445 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-06-26 06:07 UTC by user54321
Modified: 2016-01-15 19:45 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Compiled Linux-arm Terminal natives (armhf) (19.92 KB, application/gzip)
2015-08-28 20:52 UTC, arwillis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description user54321 2015-06-26 06:07:59 UTC
Setup:
Using Wandboard version C1
-Freescale iMX6 Quad, armv7
-Ubuntu 14.04 LTS hard float
-gcc/g++ v4.8 (not at the board now but believe it is Linaro)
-gdb
-Java Oracle 1.8
-Netbeans 8.02 (C/C++)

I opened the Welcome sample project under C/C++ (this happens on all projects) and tried to build the project. I get the following error:

Cannot run program "/tmp/dlight_ubuntu/.../.../pty"; error = 2. No such file or directory

When I navigate to the above directory the pty file is there, although it will not execute. The permissions for the file are rwx for user. Under the project properties the toolchain is set to GNU. I've also deleted the directory under /tmp and restarted Netbeans. Netbeans recreated the directory with file.
I am running this program locally and do not need remote.

I've seen older bugs that are the same as this one and thought it was fixed in the newest release of Netbeans.
Comment 1 ilia 2015-06-29 11:22:02 UTC
Hi,

You said NB has recreated the "pty" file. But you still got this error?
/tmp may by mounted as noexec. Also try to run NB with -J-Dcnd.tmpbase=<some_dir_with_good_permissions>

pty is used to run a Terminal, even the local one. As a workaround for this error you can set Console Type to Standard Output in the project properties.
Comment 2 ilia 2015-06-29 11:40:50 UTC
Termanal is not supported on arm architecture. 
You can download NetBeans Dev version and you won't get this error (pty is not used on arm anymore).
Comment 3 Vladimir Kvashin 2015-06-29 12:00:28 UTC
> (pty is not used on arm anymore).
That's correct. It was me who introduced some extended level of arm support (in particular, internal terminal on arm) a while ago - although linux arm is not in the list of officially supported remote platforms.

Then I understood that it wasn't a good idea since it appeared that I'm not able  to provide appropriate level of quality. There are too many different arms in this world, and I can use only a single one for testing (no official support => no testing machines park, no qa, etc).

So I had to remove it.

If somebody is enthusiastic about having terminal support on arms, he/she can try building binaries - they can be taken from
http://hg.netbeans.org/cnd-main/file/tip/dlight.nativeexecution/tools
(hg clone http://hg.netbeans.org/cnd-main; cd cnd-main/dlight.nativeexecution/tools).

If there is such an enthusiast, please let me know, I'll then add a flag that will make IDE use these binaries :)
Comment 4 user54321 2015-06-29 16:51:14 UTC
I've downloaded the NetBeans C/C++ Dev version (NetBeans IDE Build 201506290001) to get around the PTY issue but only had the option of x86 or x64 for Linux. I am running on a armv7 processor (this is where NetBeans will also be running, x86 and x64 will never be used for what I need). After downloading the script installation file I tried editing it so it would remove the x86 specific parts:

JAVA_LOCATION_0_PATH="..."
and
JVM_ARGUMENTS_NUMBER=3 to ...=2 so it would ignore JVM_ARGUMENT_2="...x86.bin"

After making these changes the file would not open and says it was corrupted, which is true at this point. So I downloaded a fresh x86 file and ran it hoping it would search my system and find the JRE I have by accessing the JAVA_HOME path (or any other generic method) and bypass any x86 specifics.
This did not work and here is the console output from running the .sh file (the '#' is added to show a console line):

#Configuring the installer...
#Searching for JVM on the system...
#Preparing bundled JVM ...
#/tmp/.nbi-1062526.tmp/jre-8u45-linux-x86.bin: 3: /tmp/.nbi-1062526.tmp/jre-8u45-linux-x86.bin: Syntax error: "(" unexpected
#Cannot prepare bundled JVM to run the installer
#Most probably the bundled JVM is not compatible with the current platform.
#See FAQ at (web-address here)

From the output it seems it is still searching for an x86 JVM which will fail on my armv7 system (hence the second to last console line). Do you have a Dev version that is configured to install and run on an armv7 system?
Comment 5 ilia 2015-06-29 17:42:24 UTC
> Do you have a Dev version that is configured to install and run on an armv7 system?

You can switch version to "Development" and Platform to "OS Independent Zip"
Here is a link http://bits.netbeans.org/download/trunk/nightly/latest/start.html?platform=zip&lang=en&option=cpp
Comment 6 soldatov 2015-07-07 21:43:24 UTC
Nice! I found money in order to buy RaspberryPi 2. And In my case a remote and local builds works nicely (Raspberry Pi 1 and Qemu is too slow configurations in order to test NetBeans).

Tested platform:
900 MHz quad-core ARM Cortex-A7
$ uname -a
Linux raspberrypi 4.0.7-v7+ #801 SMP PREEMPT Tue Jun 30 18:38:23 BST 2015 armv7l GNU/Linux
$ cat /etc/*-release | head -1
PRETTY_NAME="Raspbian GNU/Linux 7 (wheezy)"
Comment 7 user54321 2015-07-09 15:49:29 UTC
I've been running the Development release of NetBeans since you suggested it in your response. The problem is the speed is very slow, it is still usable but not very desirable.

Is there anything I can do to speed up the IDE?
Comment 8 Vladimir Kvashin 2015-07-14 10:10:12 UTC
*** Bug 253445 has been marked as a duplicate of this bug. ***
Comment 9 Vladimir Kvashin 2015-07-14 10:26:18 UTC
(In reply to user54321 from comment #7)
Could you tell us a bit more about your slowness issues:
- What specifically is slow? Build? Opening or saving a file? Overall UI? etc.
- Where are your sources reside? I guess they are on your local host and are copied to remote arm machine via SFTP, is this correct?
- How good your connection is? (at least, what time "ping" command reports?)
Comment 10 Vladimir Kvashin 2015-07-14 10:40:27 UTC
(In reply to Vladimir Kvashin from comment #9)
Please disregard this comment. I always thought of using arms via remote, so I thought you complained about remote either. Sorry.

The  question, what specifically is slow is valid however :)
Comment 11 user54321 2015-07-22 19:23:58 UTC
The UI is very slow and using the debugger.
Comment 12 arwillis 2015-08-28 20:52:02 UTC
Created attachment 155728 [details]
Compiled Linux-arm Terminal natives (armhf)

I've also included my terminal session to compile these binaries as a text file. The binaries will need to go in the following folders/directories under the netbeans home directory:

<NETBEANS_HOME>/ide/bin/nativeexecution/Linux-arm
<NETBEANS_HOME>/ide/update/backup/netbeans/bin/nativeexecution/Linux-arm/
Comment 13 arwillis 2015-08-28 20:53:02 UTC
I've compiled an arm (hard float) version of the binaries for NB 8.0.2. They work great!!

I've attached the binaries and a console log to this post.
Comment 14 arwillis 2016-01-14 17:20:24 UTC
I've downloaded netbeans 8.1 and terminal support is not present. There is no Linux-arm folder so I suspect that the IDE Terminal support will not function for arm architectures. Is this the case? I've provided armhf binaries to continue terminal support for Linux-arm terminal support. Is there anything more I can do to facilitate inclusion of this functionality?

--andrew
Comment 15 arwillis 2016-01-14 17:39:43 UTC
I've re-opened this as a bug because I've downloaded netbeans 8.1 and terminal support is not present. 
IDE Terminal support is not available for Linux-arm architectures in 8.1.

I've provided armhf binaries to continue terminal support for Linux-arm terminal support.

Is there anything more I can do to facilitate inclusion of this functionality?

I there any way to add this functionality by replacing the dlight.nativeexecution module in 8.1?

--andrew
Comment 16 Vladimir Kvashin 2016-01-15 19:45:41 UTC
Terminal support for arms was dropped because I don't have a park of arm machines to build on and test against. That's unfortunate, but that's how it is.

I agree however that if user is able to build pty binary for arm himself/herself, he/she should be able to use external terminal.

I opened another issue 257593 in this respect.
I'm closing this one.

Andrew, thank you for cooperation!