Difference between revisions of "Documentation/4.0/Developers/Build Instructions"

From Slicer Wiki
Jump to: navigation, search
(Prepend documentation/versioncheck template. See http://na-mic.org/Mantis/view.php?id=2887)
 
(55 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
+
<noinclude>{{documentation/versioncheck}}</noinclude>
 +
<br>
 
{{mbox
 
{{mbox
 
| text = The goal of the [[{{tool|logo|cmake}}|x16px]] [{{tool|homepage|cmake}} CMake] '''Super-Build''' is to provide a cross-platform build system that allows developers to quickly install and configure the multiple packages.<br><br>Where [[Slicer3:Build_Instructions|Slicer3's build system]] relied on a [[Slicer3:getbuildtest|custom build script called getbuildtest]], new features added to [{{tool|homepage|cmake}} CMake], partly driven by slicer's requirements, allow porting of the scripts to rely more on native [{{tool|homepage|cmake}} CMake] functionality with the benefit that build script is more modular and general purpose.
 
| text = The goal of the [[{{tool|logo|cmake}}|x16px]] [{{tool|homepage|cmake}} CMake] '''Super-Build''' is to provide a cross-platform build system that allows developers to quickly install and configure the multiple packages.<br><br>Where [[Slicer3:Build_Instructions|Slicer3's build system]] relied on a [[Slicer3:getbuildtest|custom build script called getbuildtest]], new features added to [{{tool|homepage|cmake}} CMake], partly driven by slicer's requirements, allow porting of the scripts to rely more on native [{{tool|homepage|cmake}} CMake] functionality with the benefit that build script is more modular and general purpose.
 
}}
 
}}
 
<br>
 
<br>
== Step0: Prerequisites ==
 
  
* See [[Documentation/{{documentation/version}}/Developers/Build Instructions/Prerequisites]]
+
== PREREQUISITES ==
 +
<br>
 +
<center>To avoid <br>[[#Common_errors|'''Common errors''']], <br>we<br> '''STRONGLY'''<br> recommend to read the<br> <font size="+2">[[Documentation/{{documentation/version}}/Developers/Build Instructions/Prerequisites|Prerequisites]]</font><br> section.</center>
 +
 
 +
<br><br><br><br>
 +
 
 +
== CHECKOUT slicer source files ==
 +
 
 +
Two options:  <code>svn</code>  or    <code>git-svn</code>
 +
 
 +
To make '''review''' and '''integration''' of your welcome contributions, we recommends the use of <code>git-svn</code>
 +
 
 +
<br>
 +
{{ambox
 +
| type  = warning
 +
| text  = While it is not enforced, we strongly recommend you to '''AVOID''' the use of '''SPACES''' for both the <code>source directory</code> and the <code>build directory</code>. We mean it.
 +
}}
 +
<br>
 +
 
 +
Note that even if you use <code>svn</code> to check out Slicer source code, you will need to have <code>git</code> installed to checkout and build other libraries. '''YES''', you need to install the things listed in the [[Documentation/{{documentation/version}}/Developers/Build Instructions/Prerequisites|prerequisites]] !.
  
  
== Step1: Checkout slicer source files using subversion  ==
+
=== Using <code>git-svn</code> ===
For example:
+
 
 +
  git clone git://github.com/Slicer/Slicer.git
 +
  cd Slicer
 +
  git svn init http://svn.slicer.org/Slicer4/trunk
 +
  git update-ref refs/remotes/git-svn refs/remotes/origin/master
 +
  git checkout master
 +
  git svn rebase
 +
 
 +
Consider reading the following page: [[Slicer:git-svn|Slicer guide to <code>git-svn</code>]]
 +
 
 +
=== Using <code>svn</code> ===
 +
 
 
  cd MyProjects
 
  cd MyProjects
 
  svn co [http://svn.slicer.org/Slicer4/trunk http://svn.slicer.org/Slicer4/trunk] Slicer4
 
  svn co [http://svn.slicer.org/Slicer4/trunk http://svn.slicer.org/Slicer4/trunk] Slicer4
Alternatively, you can control the repository using '''git-svn'''. See the [[Slicer:git-svn|git-svn]] page for more information.
 
  
 +
<br><br><br><br>
  
== Step2: Configure and generate Slicer solution files ==
+
== CONFIGURE and generate Slicer solution files ==
 
You can configure and generate Slicer solution files using either <code>ccmake</code> or <code>cmake-gui</code>.
 
You can configure and generate Slicer solution files using either <code>ccmake</code> or <code>cmake-gui</code>.
 
=== Per-platform instructions===
 
=== Per-platform instructions===
Line 24: Line 54:
 
* '''Remarks''':
 
* '''Remarks''':
 
#If you downloaded the Qt binary then <code>qmake</code> will be detected and all paths will be set automatically.   
 
#If you downloaded the Qt binary then <code>qmake</code> will be detected and all paths will be set automatically.   
#If you built your own Qt (e.g. in Debug mode for use with the designer) set the QT_QMAKE_EXECUTABLE in <code>cmake-gui</code>.QT_QMAKE_EXECUTABLE should be set to the path of the qmake.exe file, which is inside the bin directory (for example, ./QT/qt-everywhere-opensource-src-4.7.3/bin/qmake.exe).  
+
#If you built your own Qt (e.g. in Debug mode for use with the designer) set the <code>QT_QMAKE_EXECUTABLE</code> in <code>cmake-gui</code>.<code>QT_QMAKE_EXECUTABLE</code> should be set to the path of the qmake.exe file, which is inside the bin directory (for example, <code>/path/to/qt-everywhere-opensource-build-4.7.4/bin/qmake.exe</code>).  
#Windows doesn't support path longer than 260 characters, please make sure that the total path name of your Slicer-build directory is no longer than 50 characters ( for example <code>c:\work\Slicer\Slicer-Superbuild</code> (32 characters) is fine)
+
#Windows doesn't support path longer than 260 characters, please make sure that the total path name of your <code>Slicer-build</code> directory is no longer than 50 characters ( for example <code>c:\work\Slicer\Slicer-Superbuild</code> (32 characters) is fine)
  
 
==== Unix-like ====
 
==== Unix-like ====
Line 31: Line 61:
 
** Configure using the following commands. By default '''CMAKE_BUILD_TYPE''' is set to '''Debug'''.
 
** Configure using the following commands. By default '''CMAKE_BUILD_TYPE''' is set to '''Debug'''.
 
<pre>
 
<pre>
mkdir Slicer4-SuperBuild
+
mkdir Slicer4-SuperBuild-Debug
cd Slicer4-SuperBuild
+
cd Slicer4-SuperBuild-Debug
ccmake ../Slicer4
+
ccmake -DQT_QMAKE_EXECUTABLE:FILEPATH=/path/to/QtSDK-1.2/Desktop/Qt/474/gcc/bin/qmake ../Slicer4
 
</pre>
 
</pre>
 
* '''Remarks''':
 
* '''Remarks''':
# Usually, using top-level directory name like <code>Slicer-Superbuild-Release</code> or <code>Slicer-Superbuild-Debug</code> is preferred.  
+
# Using top-level directory name like <code>Slicer-Superbuild-Release</code> or <code>Slicer-Superbuild-Debug</code> is recommended.
# If you build your own Qt, then the <code>ccmake</code> command in the sequence above should also specify the path to that Qt installation.  For example,
 
<pre>
 
ccmake -DQT_QMAKE_EXECUTABLE:FILEPATH=<path_to_my_installation_of_qt>/qt-everywhere-opensource-src-4.7.3/bin/qmake ../Slicer4
 
</pre>
 
 
 
  
 
=== General information ===
 
=== General information ===
  
Two projects are generated by <code>ccmake</code>/<code>cmake-gui</code>.  
+
Two projects are generated by either <code>cmake</code>, <code>ccmake</code> or <code>cmake-gui</code>.  
  
 
One of them is in the top-level bin directory <code>Slicer4-Superbuild</code> and the other one is in the subdirectory <code>Slicer-build</code>:
 
One of them is in the top-level bin directory <code>Slicer4-Superbuild</code> and the other one is in the subdirectory <code>Slicer-build</code>:
Line 53: Line 78:
 
# The first project in <code>Slicer4-Superbuild</code> manages all the external dependencies of Slicer (VTK, ITK, Python, ...). To build Slicer for the first time, run make (or build the solution file in Visual Studio) in <code>Slicer4-Superbuild</code>, which will update and build the external libraries and if successful will then build the subproject Slicer-build.<br>
 
# The first project in <code>Slicer4-Superbuild</code> manages all the external dependencies of Slicer (VTK, ITK, Python, ...). To build Slicer for the first time, run make (or build the solution file in Visual Studio) in <code>Slicer4-Superbuild</code>, which will update and build the external libraries and if successful will then build the subproject Slicer-build.<br>
 
# The second project in <code>Slicer4-Superbuild/Slicer-build</code> is the "traditional" build directory of Slicer.  After local changes in Slicer (or after an svn update on the source directory of Slicer), only running make (or building the solution file in Visual Studio) in <code>Slicer4-Superbuild/Slicer-build</code> is necessary (the external libraries are considered built and up to date). <br>
 
# The second project in <code>Slicer4-Superbuild/Slicer-build</code> is the "traditional" build directory of Slicer.  After local changes in Slicer (or after an svn update on the source directory of Slicer), only running make (or building the solution file in Visual Studio) in <code>Slicer4-Superbuild/Slicer-build</code> is necessary (the external libraries are considered built and up to date). <br>
 
+
#'''Warning''': An important amount of disk space is required to compile Slicer in Debug (>10GB on Windows)
#Warning: a lot of space disk is necessary to compile Slicer in Debug (>10GB on Windows)
 
  
 
=== Workaround firewall blocking git protocol ===
 
=== Workaround firewall blocking git protocol ===
Line 63: Line 87:
 
* Same applies for OpenSSL: <code>CMAKE_DISABLE_FIND_PACKAGE_OpenSSL:BOOL=TRUE</code> can be passed when building Slicer for packaging.
 
* Same applies for OpenSSL: <code>CMAKE_DISABLE_FIND_PACKAGE_OpenSSL:BOOL=TRUE</code> can be passed when building Slicer for packaging.
  
== Step3: Build Slicer4 ==
+
<br><br><br><br>
After configuration, start the build process in the  Slicer4-SuperBuild directory
+
 
*Linux / Mac: Run the following code:
+
== BUILD Slicer4 ==
<pre>
+
After configuration, start the build process in the  <code>Slicer4-SuperBuild</code> directory
make -j<NUMBEROFCORES>
+
 
</pre>
+
=== Per-platform instructions===
*Windows: Open Slicer4-SuperBuild\Slicer.sln  (or Slicer-4.0\Slicer4-SuperBuild\Slicer-build\Slicer.sln) in Visual Studio and build the ALL_BUILD project.
+
==== Windows ====
 +
* Open <code>Slicer4-SuperBuild\Slicer.sln</code> in Visual Studio
 +
* Select your build configuration. Usually '''Release''' of '''Debug'''
 +
* Build the <code>ALL_BUILD</code> project.
 +
 
 +
* If you make local changes to Slicer4, open the solution file located in the directory <code>Slicer4-SuperBuild/Slicer-build</code> instead. You should then be able to either build all projects or just a specific one.
 +
 
 +
==== Unix-like ====
 +
 
 +
  cd ~/Projects/Slicer4-SuperBuild
 +
  make -j<NUMBEROFCORES>
 +
 
 +
 
 +
<br><br><br><br>
 +
 
 +
== RUN Slicer ==
 +
=== Per-platform instructions===
 +
==== Windows ====
 +
 
 +
Run <code>Slicer4-SuperBuild/Slicer-build/Slicer.exe</code>
 +
 
 +
==== Unix-like ====
  
 +
Run <code>Slicer4-SuperBuild/Slicer-build/Slicer</code>
  
{{warning}}
+
<br><br><br><br>
# As it is indicated in Step2, if you make local changes in Slicer4, run make (or build the solution file in Visual Studio) in the directory Slicer4-Superuild/Slicer-build.
 
# If you would like to make local changes and debug your code in Debug mode in Visual Studio, use the Visual Studio Command Prompt to open the solution file in Slicer4-Superuild/Slicer-build:
 
#* Open Visual Studio Command Prompt
 
#* Go to the directory  Slicer4-Superuild/Slicer-build
 
#* Write Slicer.exe --VisualStudio Slicer.sln
 
  
 +
== DEBUG Slicer ==
 +
=== Per-platform instructions===
 +
==== Windows ====
 +
* Make sure you build Slicer using the '''Debug''' configuration.
 +
* Open a windows terminal <code>cmd.exe</code>
 +
* Execute the following command:
 +
  cd \path\to\Slicer4-SuperBuild\Slicer-build
 +
  Slicer.exe --VisualStudio Slicer.sln
  
==Step4: Run Slicer4 ==
+
==== Unix-like ====
Run the launcher in Slicer4-SuperBuild/Slicer-build/Slicer (Slicer.exe on windows)
+
NA
  
 +
<br><br><br><br>
  
 
== Common errors ==
 
== Common errors ==
Line 111: Line 161:
 
=== A tool returned an error code from "Performing configure step for ..." ===
 
=== A tool returned an error code from "Performing configure step for ..." ===
  
CMake has some problems building complex projects on Windows7. See more details in: http://cmake.org/Bug/view.php?id=12957
+
Older CMake versions had some problems building complex projects on Windows7 (see more details in: http://cmake.org/Bug/view.php?id=12957).
 
+
Make sure you use the required CMake version.
A fix has been already identified and soon will be available in an official CMake release (probably 2.8.8). Until then this unofficial version can be used (based on CMake-2.8.7): https://qshare.queensu.ca/Users01/lasso/public/cmake-2.8.7.12957-win32-x86.exe
 
  
 
=== A tool returned an error code from "Performing download step (git clone) for ..." ===
 
=== A tool returned an error code from "Performing download step (git clone) for ..." ===
Line 123: Line 172:
 
=== No rule to make target `/usr/lib/x86_64-linux-gnu/libGL.so' ===
 
=== No rule to make target `/usr/lib/x86_64-linux-gnu/libGL.so' ===
 
See http://techtidings.blogspot.com/2012/01/problem-with-libglso-on-64-bit-ubuntu.html
 
See http://techtidings.blogspot.com/2012/01/problem-with-libglso-on-64-bit-ubuntu.html
 +
 +
=== X11 Window errors at start time ===
 +
<pre>
 +
X Error: BadWindow (invalid Window parameter) 3
 +
  Extension:    137 (Uknown extension)
 +
  Minor opcode: 4 (Unknown request)
 +
  Resource id:  0x4200199
 +
X Error: BadWindow (invalid Window parameter) 3
 +
  Extension:    137 (Uknown extension)
 +
  Minor opcode: 4 (Unknown request)
 +
  Resource id:  0x42001a6
 +
X Error: BadWindow (invalid Window parameter) 3
 +
  Extension:    137 (Uknown extension)
 +
  Minor opcode: 4 (Unknown request)
 +
  Resource id:  0x42001b3
 +
</pre>
 +
 +
Solution:
 +
* Reinstall Nvidia drivers (that also rewrite the xorg.conf file).
 +
 +
=== error C2061: syntax error : identifier 'ssize_t' ===
 +
<pre>
 +
4>1>Compiling...
 +
4>1>version.c
 +
4>1>c:\chene\winbin64\slicer4\cmcurl\urldata.h(585) : error C2061: syntax error : identifier 'ssize_t'
 +
4>1>c:\chene\winbin64\slicer4\cmcurl\urldata.h(593) : error C2365: 'fread' : redefinition; previous definition was 'function'
 +
4>1>        C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdio.h(248) : see declaration of 'fread'
 +
4>1>c:\chene\winbin64\slicer4\cmcurl\urldata.h(610) : error C2059: syntax error : '}'
 +
</pre>
 +
 +
Solution:
 +
* See [[#A_tool_returned_an_error_code_from_.22Performing_configure_step_for_....22]]
 +
 +
 +
<br><br><br><br>
  
 
==Platform Notes==
 
==Platform Notes==
  
 
* Linux Ubuntu: if you have odd rendering artifacts, try disabling visual effects (System/Appearance/Visual Effects)
 
* Linux Ubuntu: if you have odd rendering artifacts, try disabling visual effects (System/Appearance/Visual Effects)
 +
* Unix-Like: remember that "make" wrapping calls to pull source makes it very much not idempotent; re-running make after a build error may get past the previously encountered error. Kind of like re-compiling LaTeX many times to fix references.
 
* Windows: If build was OK, but it Slicer doesn't start (gives the error: [bin/Release/SlicerQT-real.exe] exit abnormally - Report the problem.) then one possible root cause is that you have a copy of Python26.dll in your windows system directory (e.g., c:\Windows\System32\python26.dll). The solution is to rename or remove the python dll in the system directory. See more details here: http://www.na-mic.org/Bug/view.php?id=1180
 
* Windows: If build was OK, but it Slicer doesn't start (gives the error: [bin/Release/SlicerQT-real.exe] exit abnormally - Report the problem.) then one possible root cause is that you have a copy of Python26.dll in your windows system directory (e.g., c:\Windows\System32\python26.dll). The solution is to rename or remove the python dll in the system directory. See more details here: http://www.na-mic.org/Bug/view.php?id=1180

Latest revision as of 07:36, 14 June 2013

Home < Documentation < 4.0 < Developers < Build Instructions


For the latest Slicer documentation, visit the read-the-docs.




PREREQUISITES


To avoid
Common errors,
we
STRONGLY
recommend to read the
Prerequisites
section.





CHECKOUT slicer source files

Two options: svn or git-svn

To make review and integration of your welcome contributions, we recommends the use of git-svn



Note that even if you use svn to check out Slicer source code, you will need to have git installed to checkout and build other libraries. YES, you need to install the things listed in the prerequisites !.


Using git-svn

 git clone git://github.com/Slicer/Slicer.git
 cd Slicer
 git svn init http://svn.slicer.org/Slicer4/trunk
 git update-ref refs/remotes/git-svn refs/remotes/origin/master
 git checkout master
 git svn rebase

Consider reading the following page: Slicer guide to git-svn

Using svn

cd MyProjects
svn co http://svn.slicer.org/Slicer4/trunk Slicer4





CONFIGURE and generate Slicer solution files

You can configure and generate Slicer solution files using either ccmake or cmake-gui.

Per-platform instructions

Windows

  • Recommended: cmake-gui
    • Configure using default options.
  • Remarks:
  1. If you downloaded the Qt binary then qmake will be detected and all paths will be set automatically.
  2. If you built your own Qt (e.g. in Debug mode for use with the designer) set the QT_QMAKE_EXECUTABLE in cmake-gui.QT_QMAKE_EXECUTABLE should be set to the path of the qmake.exe file, which is inside the bin directory (for example, /path/to/qt-everywhere-opensource-build-4.7.4/bin/qmake.exe).
  3. Windows doesn't support path longer than 260 characters, please make sure that the total path name of your Slicer-build directory is no longer than 50 characters ( for example c:\work\Slicer\Slicer-Superbuild (32 characters) is fine)

Unix-like

  • Recommended: ccmake
    • Configure using the following commands. By default CMAKE_BUILD_TYPE is set to Debug.
mkdir Slicer4-SuperBuild-Debug
cd Slicer4-SuperBuild-Debug
ccmake -DQT_QMAKE_EXECUTABLE:FILEPATH=/path/to/QtSDK-1.2/Desktop/Qt/474/gcc/bin/qmake ../Slicer4
  • Remarks:
  1. Using top-level directory name like Slicer-Superbuild-Release or Slicer-Superbuild-Debug is recommended.

General information

Two projects are generated by either cmake, ccmake or cmake-gui.

One of them is in the top-level bin directory Slicer4-Superbuild and the other one is in the subdirectory Slicer-build:

Slicer4-Superbuild/Slicer-build
  1. The first project in Slicer4-Superbuild manages all the external dependencies of Slicer (VTK, ITK, Python, ...). To build Slicer for the first time, run make (or build the solution file in Visual Studio) in Slicer4-Superbuild, which will update and build the external libraries and if successful will then build the subproject Slicer-build.
  2. The second project in Slicer4-Superbuild/Slicer-build is the "traditional" build directory of Slicer. After local changes in Slicer (or after an svn update on the source directory of Slicer), only running make (or building the solution file in Visual Studio) in Slicer4-Superbuild/Slicer-build is necessary (the external libraries are considered built and up to date).
  3. Warning: An important amount of disk space is required to compile Slicer in Debug (>10GB on Windows)

Workaround firewall blocking git protocol

  • Some firewall will be blocking the git protocol, a possible workaround is to configure Slicer disabling the option Slicer_USE_GIT_PROTOCOL. Then http protocol will be used instead. Consider also reading https://github.com/commontk/CTK/issues/33

Notes for advanced users

  • By default, if CMake finds Java on your machine, it automatically builds Java CLIs. If you don't want any Java in your Slicer (or if you don't want to install Java on your Mac Os X), you can pass -DCMAKE_DISABLE_FIND_PACKAGE_Java:BOOL=TRUE when configuring Slicer.
  • Same applies for OpenSSL: CMAKE_DISABLE_FIND_PACKAGE_OpenSSL:BOOL=TRUE can be passed when building Slicer for packaging.





BUILD Slicer4

After configuration, start the build process in the Slicer4-SuperBuild directory

Per-platform instructions

Windows

  • Open Slicer4-SuperBuild\Slicer.sln in Visual Studio
  • Select your build configuration. Usually Release of Debug
  • Build the ALL_BUILD project.
  • If you make local changes to Slicer4, open the solution file located in the directory Slicer4-SuperBuild/Slicer-build instead. You should then be able to either build all projects or just a specific one.

Unix-like

 cd ~/Projects/Slicer4-SuperBuild
 make -j<NUMBEROFCORES>






RUN Slicer

Per-platform instructions

Windows

Run Slicer4-SuperBuild/Slicer-build/Slicer.exe

Unix-like

Run Slicer4-SuperBuild/Slicer-build/Slicer





DEBUG Slicer

Per-platform instructions

Windows

  • Make sure you build Slicer using the Debug configuration.
  • Open a windows terminal cmd.exe
  • Execute the following command:
 cd \path\to\Slicer4-SuperBuild\Slicer-build
 Slicer.exe --VisualStudio Slicer.sln

Unix-like

NA





Common errors

error: ‘class QList<QString>’ has no member named ‘reserve’

/nfs/Users/blowekamp/QtSDK/Desktop/Qt/474/gcc/include/QtCore/qdatastream.h: In function ‘QDataStream& operator>>(QDataStream&, QList<T>&) [with T = QString]’:
/nfs/Users/blowekamp/QtSDK/Desktop/Qt/474/gcc/include/QtCore/qstringlist.h:247:   instantiated from here
/nfs/Users/blowekamp/QtSDK/Desktop/Qt/474/gcc/include/QtCore/qdatastream.h:246: error: ‘class QList<QString>’ has no member named ‘reserve’

You have multiple Qt versions installed on your machine. Try removing the Qt version installed on the system.

libarchive.so: undefined reference to `SHA256_Update'

Linking CXX executable ../../../../../bin/MRMLLogicCxxTests
/home/benjaminlong/work/slicer/Slicer4-Superbuild-Debug/LibArchive-install/lib/libarchive.so: undefined reference to `SHA256_Update'
/home/benjaminlong/work/slicer/Slicer4-Superbuild-Debug/LibArchive-install/lib/libarchive.so: undefined reference to `SHA256_Final'
/home/benjaminlong/work/slicer/Slicer4-Superbuild-Debug/LibArchive-install/lib/libarchive.so: undefined reference to `SHA256_Init'
/home/benjaminlong/work/slicer/Slicer4-Superbuild-Debug/LibArchive-install/lib/libarchive.so: undefined reference to `MD5_Init'

Solution:

cd Slicer-superbuild
rm -rf LibArchive-*
make -j4

Details:

A tool returned an error code from "Performing configure step for ..."

Older CMake versions had some problems building complex projects on Windows7 (see more details in: http://cmake.org/Bug/view.php?id=12957). Make sure you use the required CMake version.

A tool returned an error code from "Performing download step (git clone) for ..."

CMake has problems cloning git repositories on Windows7. See more details in http://cmake.org/Bug/view.php?id=12564

If you think the described problem is the same as you have, please add your specific error message to the bug report (the more people report the problem the sooner it will be fixed).

No rule to make target `/usr/lib/x86_64-linux-gnu/libGL.so'

See http://techtidings.blogspot.com/2012/01/problem-with-libglso-on-64-bit-ubuntu.html

X11 Window errors at start time

X Error: BadWindow (invalid Window parameter) 3
  Extension:    137 (Uknown extension)
  Minor opcode: 4 (Unknown request)
  Resource id:  0x4200199
X Error: BadWindow (invalid Window parameter) 3
  Extension:    137 (Uknown extension)
  Minor opcode: 4 (Unknown request)
  Resource id:  0x42001a6
X Error: BadWindow (invalid Window parameter) 3
  Extension:    137 (Uknown extension)
  Minor opcode: 4 (Unknown request)
  Resource id:  0x42001b3

Solution:

  • Reinstall Nvidia drivers (that also rewrite the xorg.conf file).

error C2061: syntax error : identifier 'ssize_t'

4>1>Compiling...
4>1>version.c
4>1>c:\chene\winbin64\slicer4\cmcurl\urldata.h(585) : error C2061: syntax error : identifier 'ssize_t'
4>1>c:\chene\winbin64\slicer4\cmcurl\urldata.h(593) : error C2365: 'fread' : redefinition; previous definition was 'function'
4>1>        C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdio.h(248) : see declaration of 'fread'
4>1>c:\chene\winbin64\slicer4\cmcurl\urldata.h(610) : error C2059: syntax error : '}'

Solution:

* See #A_tool_returned_an_error_code_from_.22Performing_configure_step_for_....22






Platform Notes

  • Linux Ubuntu: if you have odd rendering artifacts, try disabling visual effects (System/Appearance/Visual Effects)
  • Unix-Like: remember that "make" wrapping calls to pull source makes it very much not idempotent; re-running make after a build error may get past the previously encountered error. Kind of like re-compiling LaTeX many times to fix references.
  • Windows: If build was OK, but it Slicer doesn't start (gives the error: [bin/Release/SlicerQT-real.exe] exit abnormally - Report the problem.) then one possible root cause is that you have a copy of Python26.dll in your windows system directory (e.g., c:\Windows\System32\python26.dll). The solution is to rename or remove the python dll in the system directory. See more details here: http://www.na-mic.org/Bug/view.php?id=1180