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 258484 - Pi sample project can not be run/debug
Summary: Pi sample project can not be run/debug
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 8.1
Hardware: All All
: P2 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-22 11:24 UTC by Vladimir Voskresensky
Modified: 2016-04-20 14:27 UTC (History)
0 users

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 Vladimir Voskresensky 2016-03-22 11:24:56 UTC
Create Pi sample project
Clean&Build 
Run it => runs ok as "Serial" config

switch to the next configuration, i.e. Pthreads (i.e. from toolbar combox or from context menu)
Clean and Build,
try to Run it 
=> error dialog
/home/user/demo/Pi/dist/Pthreads/GNU_With_Dbx-Linux/pi does not exist or is not an executable.
Comment 1 Alexander Simon 2016-03-25 11:19:09 UTC
Cannot reproduce the bug.Please provide IDE message log.
Comment 2 Vladimir Voskresensky 2016-03-28 10:16:05 UTC
can not reproduce on Solaris and Linux at work. Need to check on laptop...
Comment 3 Vladimir Voskresensky 2016-03-29 10:29:56 UTC
I've checked on Linux.
The problem is that although Clean&Build writes "Build Successful", in fact there is a message in Output:
mkdir -p dist/Pthreads/GNU-Linux
gcc     -o dist/Pthreads/GNU-Linux/pi_2 build/Pthreads/GNU-Linux/pi_pthreads.o 
build/Pthreads/GNU-Linux/pi_pthreads.o: In function `main':
/home/vv159170/SolStudioProjects/Pi_2/pi_pthreads.c:71: undefined reference to `pthread_create'
make[2]: Leaving directory `/home/vv159170/SolStudioProjects/Pi_2'
make[1]: Leaving directory `/home/vv159170/SolStudioProjects/Pi_2'

BUILD SUCCESSFUL (total time: 176ms)

So, binary is not created.
And I have to go into properties and add Posix Threads library to resolve the issue
Comment 4 Vladimir Voskresensky 2016-03-29 10:31:44 UTC
Can we update sample project to include library by default?
Comment 5 Vladimir Voskresensky 2016-03-29 10:32:00 UTC
I mean for appropriate configurations
Comment 6 Alexander Simon 2016-03-29 11:14:47 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/42a90c8c1178
Comment 7 Quality Engineering 2016-03-30 01:38:57 UTC
Integrated into 'main-silver', will be available in build *201603300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/42a90c8c1178
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #258484 Pi sample project can not be run/debug
Comment 8 Vladimir Voskresensky 2016-04-15 16:52:59 UTC
v.
Comment 9 Alexander Pepin 2016-04-20 14:27:23 UTC
Verified in patch from staging UC.