View Issue Details

IDProjectCategoryView StatusLast Update
0003522Slicer4Core: Base Codepublic2017-06-10 08:51
Reportertokuda Assigned Tojcfr  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product VersionSlicer 4.3.1-1 
Target VersionSlicer 4.4.0Fixed in VersionSlicer 4.4.0 
Summary0003522: Build fails on Mac OS X 10.9 Maverick with X Code 5.0.2 due to nice() call
Description

Build fails on Mac OS X 10.9 Maverick with X Code 5.0.2 due to nice() call in vtkSlicerApplicationLogic.cxx. According to the man page, "this interface is obsoleted by setpriority(2)".

Here's the output:

/Users/junichi/igtdev/slicer4/Slicer/Base/Logic/vtkSlicerApplicationLogic.cxx:401:13: error: use of undeclared
identifier 'nice'
int ret = nice(20);
^
/Users/junichi/igtdev/slicer4/Slicer/Base/Logic/vtkSlicerApplicationLogic.cxx:477:13: error: use of undeclared
identifier 'nice'
int ret = nice(20);
^
2 errors generated.
make[5]: [Base/Logic/CMakeFiles/SlicerBaseLogic.dir/vtkSlicerApplicationLogic.cxx.o] Error 1
make[5]:
Waiting for unfinished jobs....

TagsNo tags attached.

Relationships

related to 0003521 closedjcfr Build fails on Mac OS X 10.9 Maverick due to compile error in VTK 

Activities

jcfr

jcfr

2013-12-06 08:43

administrator   ~0010401

Thanks the report. Would you like to work on a patch ?

tokuda

tokuda

2013-12-06 09:12

developer   ~0010403

Sure. I'm trying to replace nice() with setpriority() now. I will report how it goes.

tokuda

tokuda

2013-12-06 10:23

developer   ~0010408

I found another error in the same class:

/Users/junichi/igtdev/slicer4/Slicer/Base/Logic/vtkSlicerApplicationLogic.cxx:411:9: error: use of undeclared
identifier 'getpid'
pid = getpid();
^
/Users/junichi/igtdev/slicer4/Slicer/Base/Logic/vtkSlicerApplicationLogic.cxx:493:9: error: use of undeclared
identifier 'getpid'
pid = getpid();
^
2 errors generated.

tokuda

tokuda

2013-12-06 10:29

developer   ~0010409

Sorry, this was due to the change I made. Currently unistd.h is only included for linux as:

#ifdef linux

include <unistd.h>

#endif

but it also needs to be included in Mac OS X. I will change the code as:

#ifdef ITK_USE_PTHREADS

include <unistd.h>

include <sys/resource.h>

#endif

tokuda

tokuda

2013-12-06 11:31

developer   ~0010413

Replacing nice() with setpriority() seems working. I'm currently trying clean build with the updated VTK (see 0003521)

tokuda

tokuda

2013-12-08 13:08

developer   ~0010415

There was no compiler error. I put the updated code in:

https://github.com/tokjun/Slicer/tree/3522-build-error-Mac-OS-X-10-9

tokuda

tokuda

2013-12-08 13:43

developer   ~0010416

Slicer build from the fixed code crashes during the start-up process.

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
dyld: in dlopen()
abort() called
*** error for object 0x118f88018: pointer being freed was not allocated

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff8143d866 __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff8e44935c pthread_kill + 92
2 libsystem_c.dylib 0x00007fff8b09abba abort + 125
3 libsystem_malloc.dylib 0x00007fff863b9093 free + 411
4 dyld 0x00007fff5fc09596 void std::1::vector<ImageLoader::DynamicReference, std::1::allocator<ImageLoader::DynamicReference> >::__push_back_slow_path<ImageLoader::DynamicReference const>(ImageLoader::DynamicReference const&) + 246
5 dyld 0x00007fff5fc077c7 dyld::addDynamicReference(ImageLoader, ImageLoader) + 180
6 dyld 0x00007fff5fc0e776 ImageLoader::weakBind(ImageLoader::LinkContext const&) + 1022
7 dyld 0x00007fff5fc0da50 ImageLoader::link(ImageLoader::LinkContext const&, bool, bool, bool, ImageLoader::RPathChain const&) + 204
8 dyld 0x00007fff5fc04764 dyld::link(ImageLoader*, bool, bool, ImageLoader::RPathChain const&) + 166
9 dyld 0x00007fff5fc0b76d dlopen + 440
10 libdyld.dylib 0x00007fff8b12a7ef dlopen + 59
11 QtCore 0x000000010ae94fbd QLibraryPrivate::load_sys() + 1389
12 QtCore 0x000000010ae8fe89 QLibraryPrivate::load() + 105
13 QtCore 0x000000010ae8ff9c QLibrary::load() + 44
14 libqSlicerBaseQTCLI.dylib 0x00000001002d4352 ctkFactoryLibraryItem<qSlicerAbstractCoreModule>::load() + 98 (ctkAbstractLibraryFactory.tpp:42)
15 libqSlicerModulesCore.dylib 0x00000001001dc291 ctkAbstractFactory<qSlicerAbstractCoreModule>::registerItem(QString const&, QSharedPointer<ctkAbstractFactoryItem<qSlicerAbstractCoreModule> > const&) + 897 (ctkAbstractFactory.tpp:348)
16 libqSlicerBaseQTCLI.dylib 0x00000001002ce57e ctkAbstractFileBasedFactory<qSlicerAbstractCoreModule>::registerFileItem(QString const&, QFileInfo const&) + 1230 (ctkAbstractFileBasedFactory.h:134)
17 libqSlicerBaseQTCLI.dylib 0x00000001002cdec4 ctkAbstractFileBasedFactory<qSlicerAbstractCoreModule>::registerFileItem(QFileInfo const&) + 68 (ctkAbstractFileBasedFactory.tpp:102)
18 libqSlicerBaseQTCore.dylib 0x00000001010cef39 qSlicerAbstractModuleFactoryManager::registerModule(QFileInfo const&) + 2025 (qSlicerAbstractModuleFactoryManager.cxx:332)
19 libqSlicerBaseQTCore.dylib 0x00000001010ce6ac qSlicerAbstractModuleFactoryManager::registerModules(QString const&) + 332 (qSlicerAbstractModuleFactoryManager.cxx:269)
20 libqSlicerBaseQTCore.dylib 0x00000001010ce410 qSlicerAbstractModuleFactoryManager::registerModules() + 1216 (qSlicerAbstractModuleFactoryManager.cxx:256)
21 0x000000010002edea (anonymous namespace)::SlicerAppMain(int, char**) + 1850 (Main.cxx:160)
22 0x000000010002e6a2 main + 34 (Main.cxx:246)
23 libdyld.dylib 0x00007fff8b12b5fd start + 1

tokuda

tokuda

2013-12-08 17:06

developer   ~0010417

This happens only when I launch Slicer by running "Slicer-build/Slicer". When I run "Slicer-build/bin/Slicer.app/Contents/MacOS/Slicer", Slicer starts up normally.

jcfr

jcfr

2013-12-17 07:26

administrator   ~0010440

Fixed in r22783
See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;revision=22783

jcfr

jcfr

2014-03-06 05:03

administrator   ~0010895

Closing resolved issues that have not been updated in more than 3 months

Related Changesets

Slicer: 2145-support-for-installing-extension-from-file 35f3bf01

2013-12-17 12:09:54

jcfr

Details Diff
COMP: Fix build issue 0003522 due to nice() and getpid() calls.

From: Junichi Tokuda <tokuda@bwh.harvard.edu>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22783 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Base/Logic/vtkSlicerApplicationLogic.cxx Diff File

Import 2017-06-07 23:51:09: master 35f3bf01

2013-12-17 12:09:54

jcfr

Details Diff
COMP: Fix build issue 0003522 due to nice() and getpid() calls.

From: Junichi Tokuda <tokuda@bwh.harvard.edu>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22783 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Base/Logic/vtkSlicerApplicationLogic.cxx Diff File

Issue History

Date Modified Username Field Change
2013-12-06 08:41 tokuda New Issue
2013-12-06 08:41 tokuda Status new => assigned
2013-12-06 08:41 tokuda Assigned To => jcfr
2013-12-06 08:43 jcfr Note Added: 0010401
2013-12-06 08:44 jcfr Relationship added related to 0003521
2013-12-06 08:44 jcfr Target Version => Slicer 4.4.0
2013-12-06 09:12 tokuda Note Added: 0010403
2013-12-06 10:23 tokuda Note Added: 0010408
2013-12-06 10:29 tokuda Note Added: 0010409
2013-12-06 11:31 tokuda Note Added: 0010413
2013-12-08 13:08 tokuda Note Added: 0010415
2013-12-08 13:43 tokuda Note Added: 0010416
2013-12-08 17:06 tokuda Note Added: 0010417
2013-12-10 06:56 jcfr Relationship added related to 0003527
2013-12-10 07:19 ddldave Relationship deleted related to 0003527
2013-12-17 07:26 jcfr Note Added: 0010440
2013-12-17 07:26 jcfr Status assigned => resolved
2013-12-17 07:26 jcfr Fixed in Version => Slicer 4.4.0
2013-12-17 07:26 jcfr Resolution open => fixed
2014-03-06 05:03 jcfr Note Added: 0010895
2014-03-06 05:03 jcfr Status resolved => closed
2017-06-07 23:27 jcfr Changeset attached => Slicer 2145-support-for-installing-extension-from-file 35f3bf01
2017-06-10 08:51 jcfr Changeset attached => Slicer master 35f3bf01