Closed renerichter closed 3 years ago
The error is a bit hard to parse, but the problem is that building DIPimage without a shared library is not supported. Try configuring with "-DDIP_SHARED_LIBRARY=On".
@wcaarls thank you for the suggestion. dipimage compiled nicely and after running "make -j check" and ..install I started matlab to test my startup script. As suggested on your readme I (in matlab) addpath of the dipimage installation and run "dipimage" to receive the notifcation
Warning: Call to DIPMENUS failed:
Invalid MEX-file '/usr/local/share/DIPimage/measure.mexa64': Missing dependent shared libraries:
'libDIP.so' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol 'calloc@GLIBC_2.2.5' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '__cxa_allocate_exception@CXXABI_1.3' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '__cxa_atexit@GLIBC_2.2.5' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '__cxa_begin_catch@CXXABI_1.3' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '__cxa_end_catch@CXXABI_1.3' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '__cxa_free_exception@CXXABI_1.3' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '__cxa_guard_abort@CXXABI_1.3' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '__cxa_guard_acquire@CXXABI_1.3' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '__cxa_guard_release@CXXABI_1.3' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '__cxa_rethrow@CXXABI_1.3' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '__cxa_throw@CXXABI_1.3' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol 'free@GLIBC_2.2.5' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '__gxx_personality_v0@CXXABI_1.3' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol 'malloc@GLIBC_2.2.5' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol 'memcmp@GLIBC_2.2.5' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol 'memcpy@GLIBC_2.14' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol 'memmove@GLIBC_2.2.5' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol 'memset@GLIBC_2.2.5' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol 'mxCreateCharArray@v7.3' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol 'mxCreateDoubleMatrix@v7.3' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol 'mxCreateStructMatrix@v7.3' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol 'mxGetCell@v7.3' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol 'mxGetDimensions@v7.3' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol 'mxGetField@v7.3' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol 'mxGetNumberOfDimensions@v7.3' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol 'mxGetString@v7.3' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol 'mxSetFieldByNumber@v7.3' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol 'mxSetProperty@v7.3' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol 'realloc@GLIBC_2.2.5' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '__stack_chk_fail@GLIBC_2.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol 'strcmp@GLIBC_2.2.5' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol 'strlen@GLIBC_2.2.5' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol 'tolower@GLIBC_2.2.5' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_Unwind_Resume@GCC_3.0' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZdlPvm@CXXABI_1.3.9' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZN3dip15MeasurementToolC1Ev' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZN3dip5Image15SpatialToTensorEmmm' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZN3dip5Image16SetNormalStridesEv' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZN3dip5Image4CopyERKS0_' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZN3dip5Image4View4CopyERKS0_' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZN3dip5Image4View4FillERKNS0_6SampleE' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZN3dip5Image5ForgeEv' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZN3dip5Image7ConvertENS_8DataTypeE' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZN3dip5LabelERKNS_5ImageERS0_mmmSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EE' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZN3dip5UnitsC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZN3dip8DataType10Class_UIntE' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZN3dip8DataType13Class_ComplexE' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNK3dip15MeasurementTool7MeasureERKNS_5ImageES3_St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EERKNS_14DimensionArrayImEEm' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNK3dip5Image4RealEv' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNK3dip5Image9ImaginaryEv' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNK3dip5Units20StringRepresentationB5cxx11Eb' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNKSt25__codecvt_utf8_utf16_baseIDsE10do_unshiftER11__mbstate_tPcS3_RS3_@GLIBCXX_3.4.21' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNKSt25__codecvt_utf8_utf16_baseIDsE11do_encodingEv@GLIBCXX_3.4.21' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNKSt25__codecvt_utf8_utf16_baseIDsE13do_max_lengthEv@GLIBCXX_3.4.21' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNKSt25__codecvt_utf8_utf16_baseIDsE16do_always_noconvEv@GLIBCXX_3.4.21' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNKSt25__codecvt_utf8_utf16_baseIDsE5do_inER11__mbstate_tPKcS4_RS4_PDsS6_RS6_@GLIBCXX_3.4.21' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNKSt25__codecvt_utf8_utf16_baseIDsE6do_outER11__mbstate_tPKDsS4_RS4_PcS6_RS6_@GLIBCXX_3.4.21' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNKSt25__codecvt_utf8_utf16_baseIDsE9do_lengthER11__mbstate_tPKcS4_m@GLIBCXX_3.4.21' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc@GLIBCXX_3.4.21' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSo9_M_insertImEERSoT_@GLIBCXX_3.4.9' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt12length_errorC1EPKc@GLIBCXX_3.4.21' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt12length_errorD1Ev@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt15basic_streambufIcSt11char_traitsIcEE4syncEv@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt15basic_streambufIcSt11char_traitsIcEE5imbueERKSt6locale@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt15basic_streambufIcSt11char_traitsIcEE5uflowEv@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt15basic_streambufIcSt11char_traitsIcEE6setbufEPcl@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt15basic_streambufIcSt11char_traitsIcEE6xsgetnEPcl@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt15basic_streambufIcSt11char_traitsIcEE7seekoffElSt12_Ios_SeekdirSt13_Ios_Openmode@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt15basic_streambufIcSt11char_traitsIcEE7seekposESt4fposI11__mbstate_tESt13_Ios_Openmode@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt15basic_streambufIcSt11char_traitsIcEE9pbackfailEi@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt15basic_streambufIcSt11char_traitsIcEE9showmanycEv@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt15basic_streambufIcSt11char_traitsIcEE9underflowEv@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt25__codecvt_utf8_utf16_baseIDsED2Ev@GLIBCXX_3.4.21' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt6localeC1Ev@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt6localeD1Ev@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm@GLIBCXX_3.4.21' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc@GLIBCXX_3.4.21' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4swapERS4_@GLIBCXX_3.4.21' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc@GLIBCXX_3.4.21' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm@GLIBCXX_3.4.21' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm@GLIBCXX_3.4.21' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_@GLIBCXX_3.4.21' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm@GLIBCXX_3.4.21' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt8ios_base4InitC1Ev@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt8ios_base4InitD1Ev@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt9bad_allocD1Ev@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt9basic_iosIcSt11char_traitsIcEE5rdbufEPSt15basic_streambufIcS1_E@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZNSt9exceptionD2Ev@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_Znwm@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZSt11_Hash_bytesPKvmm@CXXABI_1.3.5' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l@GLIBCXX_3.4.9' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZSt17__throw_bad_allocv@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZSt19__throw_logic_errorPKc@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZSt19__throw_range_errorPKc@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZSt20__throw_length_errorPKc@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZSt4cout@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZTISt12length_error@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZTISt15basic_streambufIcSt11char_traitsIcEE@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZTISt25__codecvt_utf8_utf16_baseIDsE@GLIBCXX_3.4.21' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZTISt9bad_alloc@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZTISt9exception@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZTVN10__cxxabiv117__class_type_infoE@CXXABI_1.3' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZTVN10__cxxabiv120__si_class_type_infoE@CXXABI_1.3' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZTVSt15basic_streambufIcSt11char_traitsIcEE@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'
Missing symbol '_ZTVSt9bad_alloc@GLIBCXX_3.4' required by '/usr/local/share/DIPimage/measure.mexa64'.
together with a very long error-trace-list on whose end I find:
`Missing symbol 'sysconf@GLIBC_2.2.5' required by
'/usr/lib/libgomp.so.1->/usr/local/share/DIPimage/private/libDIP.so->/usr/local/share/DIPimage/private/numberofthreads.mexa64'
Missing symbol 'vfprintf@GLIBC_2.2.5' required by
'/usr/lib/libgomp.so.1->/usr/local/share/DIPimage/private/libDIP.so->/usr/local/share/DIPimage/private/numberofthreads.mexa64'.
Error in dippreferences (line 76)
'NumberOfThreads', struct('type','integer','value',numberofthreads),...
Error in dipgetpref (line 51)
pref = dippreferences('get',name);
Error in dipinit (line 38)
dipinit_ws = [dipgetpref('DefaultFigureWidth'),dipgetpref('DefaultFigureHeight')];
Error in dipimage/do_start (line 111)
evalin('base','dipinit');
Error in dipimage (line 48)
do_start;
So it appears to me that dipLIB.so (as a shared library) is not automatically shifted to its according place even though this is stated during the "make -j check" routine.
Hmm, I'm not getting this behavior here. It seems libDIP.so cannot be found, but its path should be hardcoded in the mexfiles. The fact that it's complaining about basic and Matlab-specific symbols is also strange. Can you run
ls /usr/local/lib ldd /usr/local/share/DIPimage/measure.mexa64
and post the output? @crisluengo, any ideas?
This is weird. You should have a file /usr/local/lib/libDIP.so
. You do need admin privileges to install the file there, so the installation could have failed? I would expect make install
to show an error message in that case. This issue would be fixed by doing either sudo make install
, or configuring the build to install in $HOME
.
Hiho, please excuse my late reply and thank you for your thoughts. Here are my comments:
ls /usr/local/lib I ran it with access listing and this is the result:
drwxr-xr-x 3 root root 4.0K May 20 15:46 cmake -rw-r--r-- 1 root root 5.5K May 21 16:51 DIPjavaio.jar -rwxr-xr-x 1 root root 83K May 21 16:51 libDIPjavaio.so -rwxr-xr-x 1 root root 17M May 21 16:50 libDIP.so -rwxr-xr-x 1 root root 439K May 21 16:51 libDIPviewer.so
ldd /usr/local/share/DIPimage/measure.mexa64
linux-vdso.so.1 (0x00007ffe13d6a000) libmex.so => not found libmx.so => not found libDIP.so => /usr/local/share/DIPimage/../../lib/libDIP.so (0x00007f8c9ab6b000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f8c9a98e000) libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f8c9a974000) libc.so.6 => /usr/lib/libc.so.6 (0x00007f8c9a7a7000) libfftw3f.so.3 => /usr/lib/libfftw3f.so.3 (0x00007f8c9a557000) libfftw3f_threads.so.3 => /usr/lib/libfftw3f_threads.so.3 (0x00007f8c9a54e000) libfftw3.so.3 => /usr/lib/libfftw3.so.3 (0x00007f8c9a309000) libfftw3_threads.so.3 => /usr/lib/libfftw3_threads.so.3 (0x00007f8c9a300000) libgomp.so.1 => /usr/lib/libgomp.so.1 (0x00007f8c9a2bf000) libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f8c9a29e000) libm.so.6 => /usr/lib/libm.so.6 (0x00007f8c9a157000) /usr/lib64/ld-linux-x86-64.so.2 (0x00007f8c9b9fa000) libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f8c9a150000)
This issue would be fixed by doing either sudo make install,
Installation of dipimage was performed via sudo make -j install
(as was matlab btw).
Thank you for your thoughts. It seems that maybe my system or the matlab installation is misconfigured...
So it does know where to find libDIP.so. I’m guessing then that the “Missing dependent shared libraries: 'libDIP.so'” error is not because it is missing, but because it cannot be loaded.
And that could be caused by using a newer version of the GCC libraries than what MATLAB uses. MATLAB ships (used to ship, not sure if they still do this) a copy of the GCC libraries it uses. Those libraries are loaded before your MEX-file, so when your MEX-file loads, the preloaded GCC libs have missing symbols, preventing libDIP.so from properly loading.
The “official” solution from MathWorks is to use only the GCC version that is compatible with your version of MATLAB.
The non-supported solution, which I’ve successfully used in the past (but I haven’t used MATLAB on Linux in quite a while), is to delete the GCC libs that come with MATLAB, so that MATLAB uses the newer ones you have in your system folder. GCC is pretty good with backward-compatibility, so this should not be a problem. If you move the libraries away, or rename them, then you can see if MATLAB loads properly without them, and can restore them if you find a problem.
The libraries to be removed are in <matlabroot>/sys/os/glnxa64
. You can type matlabroot
at the MATLAB command prompt to find its root directory.
You probably should remove libstdc++.so.6
, libglib-2.0.so
and libgomp.so
. Each of these should have a corresponding version under usr/lib/
, which MATLAB will then use instead of its own copy.
Related: https://www.mathworks.com/support/bugreports/1297894 (requires MATLAB account).
the compatible compiler seems to be GCC4.9.x
On my linux, the $matlabroot
is not set and hence I used matlab -n
to get system-data, leading to paths like:
MATLAB = /usr/local/MATLAB/R2017b
ARCH = glnxa64
TOOLBOX = /usr/local/MATLAB/R2017b/toolbox
LD_LIBRARY_PATH = /usr/local/MATLAB/R2017b/sys/opengl/lib/glnxa64:/usr/local/MATLAB/R2017b/sys/os/glnxa64:/u
sr/local/MATLAB/R2017b/bin/glnxa64:/usr/local/MATLAB/R2017b/extern/lib/glnxa64:/usr/local/MATLAB/R2017b/sys/java/jre/gln
xa64/jre/lib/amd64/native_threads:/usr/local/MATLAB/R2017b/sys/java/jre/glnxa64/jre/lib/amd64/server
The folder matlabroot/sys/os/glnxa64 holds:
libgcc_s.so.1 libifcore.so.5 libintlc.so.5 libquadmath.so.0 libstdc++.so.6.0.20
libgfortran.so.3 libifport.so.5 libiomp5.so libquadmath.so.0.0.0 libsvml.so
libgfortran.so.3.0.0 libimf.so libirc.so libstdc++.so.6 README.libstdc++
Hence: I excluded libstdc++.so.6 and made sure it exists under /usr/lib. Starting matlab leads now to
com.jogamp.opengl.GLException: X11GLXDrawableFactory - Could not initialize shared resources for X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x1fb8f100, isOwner false, <6938702d, 124595c1>[count 0, qsz 0, owner <NULL>]]]
at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:326)
at jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:297)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:688)
at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:580)
at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:297)
... 2 more
Which seems uncorrelated to dipimage and is a problem of my installation under linux. I never saw this error before and will try to trace that. Further I ran dipimage
which for now starts without any direct error except a follow-up from the x11 error.
MATLAB has experienced a low-level graphics error, and may not have drawn correctly.
Read about what you can do to prevent this issue at Resolving Low-Level Graphics Issues then restart MATLAB.
To share details of this issue with MathWorks technical support,
please include this file with your service request.
Thank you very much for your help so far. I wouldn't have made it here without your support!
Thank you for your perseverance! This is good experience for us, will make it much easier on the next person with a similar issue.
So R2017b was build with GCC 4.9?! Ouch!
Your new error message seems related to the OpenGL driver. I’m sure you already found this: https://www.mathworks.com/matlabcentral/answers/342906-could-not-initialize-shared-resources-for-x11graphicsdevice
By the way, matlabroot
is a command in MATLAB. But matlab -n
is a good solution as well.
Thank you for pointing me to the right mathworks-discussion on the topic. Starting matlab from commandline via
export MESA_LOADER_DRIVER_OVERRIDE=i965; matlab
solved the issue for me for now. Awesome!
I tested FT2D in the GUI (cmd=dipimage) with an arbitrary rr(128,128) image and it works nicely, while it seems that "dip_fouriertransform" is no longer part of the library. I thus cannot evaluate
a=rr(128,128);dip_fouriertransform(a,'forward',[1 1])
which I believe was working with DIPimage (DIPlib) 2.x before. Or is there any mistake?
Further in the installation instruction it is stated that addpath('/usr/share/DIPimage')
should be part of the MATLAB startup script, but my DIP installation is actually in addpath('/usr/local/share/DIPimage')
. Shall this be updated or does it change per system?
Thanks for pointing this out, I will update the installation instructions to be more clear about this. You need to add the path where DIPimage was installed, which is configurable in CMake. I guess the default installation root is /usr/local/
, not /usr/
, on Linux.
One big change from DIPimage 2.9 to 3.0 is the removal of all dip_xxx
low-level functions. The "normal" interface has always been easier to use, and is the one that is preserved in 3.0. dip_fouriertransform(a,'forward',[1 1])
is the same as ft(a)
, just a lot harder to type... Also check the 'symmetric'
option to ft
for compatibility with 2.9.
At the bottom of the change log you'll find a list of all old dip_xxx
functions and the corresponding function to use instead.
thank you for pointing this out. To make DIPlib3.0 compatible with our existing code we wrote some new overrides such that it just smoothely works as before, but hence dip_filter is not reachable anymore as well (at least on Linux)?
I don't have a dip_filter
in 2.9 either? Are you sure it's not custom code?
We are checking this internally now, as developing with the "dip_filter" routine is not part of my code-base. Sorry for the confusion!
While ft works like a charm I encountered that (by forcing an error eg using array-dimensions starting from 0) dipimage uses the header files of the folder used for its compilation, so eg
>>> a=rr(16,16);ft(a,'symmetric',[0,1])
Error using dip_filtering
Process array contains index out of range
in function: dip::BooleanArray dml::GetProcessArray(const mxArray*, dip::uint) (/home/.../Downloads/MATLAB/diplib/include/dip_matlab_interface.h
at line number 267)
Error in ft (line 71)
out = dip_filtering('ft',in,options,varargin{:});
Wouldn't it be better if these header-files would be included/used from somewhere like /usr/local/share/DIPimage
? But find /usr/local/share/DIPimage/ -name "*.h"
returns nothing. Maybe my installation configuration is wrong?
DIPimage uses those header files only at compile time. The file name locations are generated at compile time and embedded in the MEX-file and/or libDIP.dylib. If you turn off the stack trace generation in CMake when building DIPimage, you will not see those messages.
I appreciate these questions. It is good to have answers for them online, surely other people will have the same questions. But I worry that they’ll be hard to find this way. Could you please open a new issue for each distinct question? That way they will be easier to find, I hope.
Since your original problem was solved, I will close this issue. Feel free to reopen if the problems building DIPimage reappear.
Component CMake build scripts for GIT-commit-ID c9078cd
Describe the bug CMake fails to compile (maybe due to missing io.h and and pthread-problems)
To Reproduce
System information:
Messages
CmakeError.log