Forum: help
Monitor Forum | Start New ThreadRE: Install on Mac [ Reply ] By: Benjamin Roy on 2008-05-30 10:02 | [forum:66476] |
Hello"MPTK_CONFIG_FILENAME" and "LD_LIBRARY_PATH" are environment variables, this variables are use by the operating system to manage application using shared libraries. You can find some informations about here: http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/EnvironmentVars.html |
RE: Install on Mac [ Reply ] By: chris layman on 2008-05-28 20:24 | [forum:65775] |
Hey thanks I am trying to follow this but i am not really a computer person. i am confused about a few things: what exactly is the "MPTK_CONFIG_FILENAME"? and "LD_LIBRARY_PATH"? im not sure i understnd this as well: -Edit ~/.MacOSX/environment.plist to add a key-value pair MPTK_CONFIG_FILENAME="/Users/your-username/.mptk/path.xml" environment.plist? sorry to keep bugging you! |
RE: Install on Mac [ Reply ] By: Benjamin Roy on 2008-05-28 08:48 | [forum:65487] |
Hello, MPTK appears to be install correctly but in order to work correctly you have to set an environment variable, on MAC OS X as far !I know there is two way: -Use Bash shell with command: export MPTK_CONFIG_FILENAME="path_to_MPTK/bin/path.xml" -Edit ~/.MacOSX/environment.plist to add a key-value pair MPTK_CONFIG_FILENAME="/Users/your-username/.mptk/path.xml" The second problem is the path of the dictionary used for decomposition, in run InstallMat2MPTK for Enter Dictionaries Path ['/Applications/mtlb/toolbox/Wavelab850/Dict/']: '/Applications/mtlb/toolbox/Wavelab850/Dict' you omitted a the last '/' but there is some problems with Mat2MPTK cause it's no longer maintain. There is solution that may help you in this feed back just here: " - Packages: for Fedora 6, packages needed are fftw-devel, libsndfile-devel, qt-devel I had the fftw, libsndfile and qt packages installed but not the devel it took me a while to realize I needed the devels.... - To have MPTK works in the command line, I had to set 2 variables export LD_LIBRARY_PATH="/usr/local/MPTK-0.5.4/lib" export MPTK_CONFIG_FILENAME="/usr/local/MPTK-0.5.4/path.xml" - I also have to do as root: setenforce 0 This is to prevent this error: /usr/local/MPTK-0.5.4/bin/mpd: error while loading shared libraries: /usr/local/MPTK-0.5.4/lib/libmptk.so: cannot restore segment prot after reloc: Permission denied In fact: setenforce 0 disables the security tool SELinux. Setenforce 0 is not a long term solution. Instead, need to allow via the commands "audit2allow" and "semodule" the access to processus and files related to MPTK. - Dictionaries: I found 3 dictionaries in the Source files: /usr/local/src/MPTK-Source-0.5.4/src/tests/signals/dico_test.xml /usr/local/src/MPTK-Source-0.5.4/src/tests/signals/book_test.xml /usr/local/src/MPTK-Source-0.5.4/reference/dictionary/dic_gabor_two_scales.xml It turns out that only dico_test.xml is valid ! (this is the one available on the web site http://mptk.irisa.fr/mptk-users/mptk-users-1/examples/dictionnary/test.xml/view ). The others seems to be in the old format. - Matlab interface: * Problem in InstallMat2MPTK: If you run InstallMPTK entering the following path: >> InstallMat2MPTK >Enter MPTK Path ['/usr/local/bin/']: '/usr/local/MPTK-0.5.4/bin/' >Enter Dictionaries Path ['/home/anthoine/Dict/']: '/usr/local/MatlabR2006b/toolbox/Mat2MPTK/Dict/' Then InstallMPTK will generate a dictionary and put it in /usr/local/MatlabR2006b/toolbox/Mat2MPTK/Dict/default.xml with the command GenerDict('default.xml'); in line 39 of the file. The generated file is the same as /usr/local/src/MPTK-Source-0.5.4/reference/dictionary/dic_gabor_two_scales.xml so it is not valid (old version). Moreover InstallMPTK puts its where I had my default dictionary, erasing my default without telling me so it was quite hard to understand why opening the matlab interface would result later in MPTK not working in command line any more.... I disabled GenerDict('default.xml'); in InstallMPTK.m * Problem 1 in Mat2MPTKdemo: using mpd >> Mat2MPTKdemo >/usr/local/MPTK-0.5.4/bin/mpd tempin.wav tempbook.bin -D/usr/local/MatlabR2006b/toolbox/Mat2MPTK/Dict/default.xml -n1000 -Etempdecay.txt -R100 tempres.wav: Segmentation fault > >/home/anthoine/tmp > >??? Error using ==> wavread >Cannot open file. > >Error in ==> mpd at 37 >varargout{2} = wavread('tempres.wav'); > >Error in ==> Mat2MPTKdemo at 2 >[B, res, dec]=mpd(y, Fs, 'n', 1000, 'R', 100);%will run mpd with the 'default.xml' dictionary file. Here the problem is that the variables LD_LIBRARY_PATH MPTK_CONFIG_FILENAME are not the good one when mpd_wrap call the system command to call mpd (line 255). I had to change this line from: system(varargout{1}); to: system([' LD_LIBRARY_PATH="/usr/local/MPTK-0.5.4/lib" ', varargout{1} ,' -C/usr/local/MPTK-0.5.4/path.xml']); Now the mpd command is launched from matlab and writes the results. A cleaner fix is to make sure that LD_LIBRARY_PATH and MPTK_CONFIG_FILENAME are set in the .bashrc (I am using bash). Then one can remove ' -C/usr/local/MPTK-0.5.4/path.xml' in the system call above since MPTK_CONFIG_FILENAME is properly set even within matlab to /usr/local/MPTK-0.5.4/path.xml However, the LD_LIBRARY_PATH within Matlab is LD_LIBRARY_PATH = /usr/local/MatlabR2006b/sys/os/glnx86:/usr/local/MatlabR2006b/bin/glnx86:/usr/local/MatlabR2006b/extern/lib/glnx86:/usr/local/MatlabR2006b/sys/java/jre/glnx86/jre1.5.0/lib/i386/native_threads:/usr/local/MatlabR2006b/sys/java/jre/glnx86/jre1.5.0/lib/i386/client:/usr/local/MatlabR2006b/sys/java/jre/glnx86/jre1.5.0/lib/i386:/usr/local/MPTK-0.5.4/lib It does contain /usr/local/MPTK-0.5.4/lib but mpd can not deal with it. If I export this value for LD_LIBRARY_PATH in a terminal, the command line mpd does not work ither !!! In fact the problem is in adding /usr/local/MatlabR2006b/bin/glnx86/ in LD_LIBRARY_PATH because this directory contains inernal matlab fftw3 libraries. In my case, the matlab fftw3 version is 3.1.1 but the one with which MPTK is installed is 3.1.2. For now, I do not know how to update matlab so it uses 3.1.2 so I am using the mysystem script given by Remi: function mysystem(string) mystring = ['setenv LD_LIBRARY_PATH /usr/local/MPTK-0.5.4/lib;' string] system(mystring) * Problem 2 in Mat2MPTKdemo: using bookread.m I had to copy the version of bookread from .../MPTK-Source-0.5.4/src/matlab/scripts/bookread.m, the one in Mat2MPTK is not valid. The mex compiled from MPTK-0.5.4 for bookread and bookwrite are not compatible with each other, so I use bookread.m and bookwrite.m from .../MPTK-Source-0.5.4/src/matlab/scripts/. * Problem 3 in Mat2MPTKdemo: using mpd In the script mpd.m The first output is missing, need to add the line: varargout{1} = bookread('tempbook.bin'); There is a useless line with only 'cd' in it. * Problem 4 using bookover: I think "hamming" and other functions used in bookover.m are in a specific matlab toolbox that I do not have. In any case, I can not use it. * Note in Mat2MPTKdemo: about mpcat: The mpcat example in Mat2MPTKdemo.m produces a book B3 which seems to be equal to B except for numSamples: B.numSamples=73113, B3.numSamples=73088. In fact, the atoms in B do not cover the all time span of the original signal which is 73113 but only 73088 samples. So B3.numSamples seems more correct to me. (By the way understanding why the signal reconstruted from different atoms do not have the same length was not straightforward for us. We had to check how they are aligned). * I have not tested mpd_demix yet. I think dictread and dicwrite may work but are not compatible with each other. " |
RE: Install on Mac [ Reply ] By: chris layman on 2008-05-27 22:20 | [forum:65304] |
on second thought maybe the cmake isn't installing correctly. here is my log: http://www.uvm.edu/~clayman/camke_compile.txt |
RE: Install on Mac [ Reply ] By: chris layman on 2008-05-27 21:54 | [forum:65298] |
Hi, It seems that cmake compiled ok now. But i am having trouble getting it to work in matlab. here's what i get within matlab: run InstallMat2MPTK Enter MPTK Path ['/usr/local/bin/']: '/usr/local/bin/' Enter Dictionaries Path ['/Applications/mtlb/toolbox/Wavelab850/Dict/']: '/Applications/mtlb/toolbox/Wavelab850/Dict' >> Mat2MPTKdemo mptk ERROR -- MPTK_Env_c::get_configuration_file() - Could not find MPTK Env variable with path to config file. mptk ERROR -- MPTK_Env_c::load_environnement() - couldn't load the MPTK environmentmptk INFO -- mpd - ------------------------------------ mptk INFO -- mpd - MPD - MATCHING PURSUIT DECOMPOSITION mptk INFO -- mpd - ------------------------------------ mptk INFO -- mpd - The command line was: /usr/local/bin/mpd -D/Applications/mtlb/toolbox/Wavelab850/Dictdefault.xml -n1000 -Etempdecay.txt -R100 tempin.wav tempbook.bin tempres.wav mptk INFO -- mpd - End command line. mptk INFO -- mpd - Loading the dictionary... mptk INFO -- mpd - (In the following, spurious output of dictionary pieces would be a symptom of parsing errors.) mptk ERROR -- MP_Dict_c::load_xml_file(const char* fName) - Error while loading the dictionary file [/Applications/mtlb/toolbox/Wavelab850/Dictdefault.xml]. mptk ERROR -- MP_Dict_c::load_xml_file(const char* fName) - Error ID: 2 . mptk ERROR -- MP_Dict_c::load_xml_file(const char* fName) - Error description: Failed to open file . mptk ERROR -- MP_Dict_c::init(dictFileName) - The dictionary scanned from file [/Applications/mtlb/toolbox/Wavelab850/Dictdefault.xml] contains no recognized blocks. mptk ERROR -- mpd - Failed to create a dictionary from XML file [/Applications/mtlb/toolbox/Wavelab850/Dictdefault.xml]. ??? Error using ==> bookread at 26 Can't open file [tempbook.bin] Error in ==> mpd at 35 varargout{1} = bookread('tempbook.bin'); Error in ==> Mat2MPTKdemo at 2 [B, res, dec]=mpd(y, Fs, 'n', 1000, 'R', 100);%will run mpd with the 'default.xml' dictionary file. ---- the Dict folder only has a a single file in it 'default.xml', it that right? I can't find a file called tempbook either? thanks chris >> |
RE: Install on Mac [ Reply ] By: chris layman on 2008-05-27 17:28 | [forum:65223] |
hey thank you very much, i'll try that. |
RE: Install on Mac [ Reply ] By: Benjamin Roy on 2008-05-27 09:50 | [forum:65059] |
Hello, This error is due to the CMake version, you are using 2.6.0 release which is the later one. I recommand to use 2.4.8 release cause there was a lot of change in 2.6.0 and the stability of this CMake release will be better in few build... Thanks for reporting this problem. |
Install on Mac [ Reply ] By: chris layman on 2008-05-27 00:28 | [forum:64837] |
Hi, can anybody help me please. I am trying to install this things on my MacBook Pro. And I am getting these errors when I do the cmake compile. fftw3.h found !! fftw3 lib found !! fftw3.h found !! fftw3 lib found !! SndFile.h found !! SndFile library found !! pthread library found !! Looking for limits.h Looking for limits.h - found Looking for assert.h Looking for assert.h - found Looking for inttypes.h Looking for inttypes.h - found Looking for unistd.h Looking for unistd.h - found Looking for math.h Looking for math.h - found Looking for memory.h Looking for memory.h - found Looking for stdarg.h Looking for stdarg.h - found Looking for stdint.h Looking for stdint.h - found Looking for stdlib.h Looking for stdlib.h - found Looking for strings.h Looking for strings.h - found Looking for string.h Looking for string.h - found Looking for sys/stat.h Looking for sys/stat.h - found Looking for sys/types.h Looking for sys/types.h - found Looking for include files HAVE_SYS_PRCTL_H Looking for include files HAVE_SYS_PRCTL_H - not found. Looking for include files STDC_HEADERS Looking for include files STDC_HEADERS - found Looking for stddef.h Looking for stddef.h - found Check size of int Check size of int - done Check size of long Check size of long - done Check size of void* Check size of void* - done Check size of char Check size of char - done Check size of short Check size of short - done Check size of float Check size of float - done Check size of double Check size of double - done Check size of unsigned int Check size of unsigned int - done Check size of unsigned long int Check size of unsigned long int - done Check size of unsigned short int Check size of unsigned short int - done Looking for include files CMAKE_HAVE_PTHREAD_H Looking for include files CMAKE_HAVE_PTHREAD_H - found Looking for pthread_create in pthreads Looking for pthread_create in pthreads - not found Looking for pthread_create in pthread Looking for pthread_create in pthread - found Check if the system is big endian Searching 16 bit integer Check size of unsigned short Check size of unsigned short - done Using unsigned short Check if the system is big endian - little endian Looking for C++ include iostream Looking for C++ include iostream - found Check for STD namespace Check for STD namespace - found Check for ANSI scope Check for ANSI scope - found Looking for C++ include sstream Looking for C++ include sstream - found CMake Warning (dev) at src/libmptk/CMakeLists.txt:4 (ADD_EXECUTABLE): Policy CMP0002 is not set: Logical target names must be globally unique. Run "cmake --help-policy CMP0002" for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at src/libmptk/CMakeLists.txt:127 (ADD_CUSTOM_TARGET): Policy CMP0002 is not set: Logical target names must be globally unique. Run "cmake --help-policy CMP0002" for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at src/libmptk/CMakeLists.txt:146 (ADD_LIBRARY): Policy CMP0002 is not set: Logical target names must be globally unique. Run "cmake --help-policy CMP0002" for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at CMake/buildEXECUTABLE.cmake:16 (ADD_CUSTOM_TARGET): Policy CMP0002 is not set: Logical target names must be globally unique. Run "cmake --help-policy CMP0002" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack (most recent call first): src/libmptk/CMakeLists.txt:160 (INCLUDE) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at CMake/buildEXECUTABLE.cmake:23 (ADD_EXECUTABLE): Policy CMP0002 is not set: Logical target names must be globally unique. Run "cmake --help-policy CMP0002" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack (most recent call first): src/libmptk/CMakeLists.txt:160 (INCLUDE) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at CMake/buildEXECUTABLE.cmake:73 (ADD_CUSTOM_TARGET): Policy CMP0002 is not set: Logical target names must be globally unique. Run "cmake --help-policy CMP0002" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack (most recent call first): src/libmptk/CMakeLists.txt:160 (INCLUDE) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at CMake/buildEXECUTABLE.cmake:80 (ADD_EXECUTABLE): Policy CMP0002 is not set: Logical target names must be globally unique. Run "cmake --help-policy CMP0002" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack (most recent call first): src/libmptk/CMakeLists.txt:160 (INCLUDE) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at CMake/buildEXECUTABLE.cmake:93 (ADD_CUSTOM_TARGET): Policy CMP0002 is not set: Logical target names must be globally unique. Run "cmake --help-policy CMP0002" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack (most recent call first): src/libmptk/CMakeLists.txt:160 (INCLUDE) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at CMake/buildEXECUTABLE.cmake:94 (ADD_EXECUTABLE): Policy CMP0002 is not set: Logical target names must be globally unique. Run "cmake --help-policy CMP0002" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack (most recent call first): src/libmptk/CMakeLists.txt:160 (INCLUDE) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at CMake/buildEXECUTABLE.cmake:107 (ADD_CUSTOM_TARGET): Policy CMP0002 is not set: Logical target names must be globally unique. Run "cmake --help-policy CMP0002" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack (most recent call first): src/libmptk/CMakeLists.txt:160 (INCLUDE) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at CMake/buildEXECUTABLE.cmake:108 (ADD_EXECUTABLE): Policy CMP0002 is not set: Logical target names must be globally unique. Run "cmake --help-policy CMP0002" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack (most recent call first): src/libmptk/CMakeLists.txt:160 (INCLUDE) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at CMake/buildEXECUTABLE.cmake:121 (ADD_CUSTOM_TARGET): Policy CMP0002 is not set: Logical target names must be globally unique. Run "cmake --help-policy CMP0002" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack (most recent call first): src/libmptk/CMakeLists.txt:160 (INCLUDE) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at CMake/buildEXECUTABLE.cmake:122 (ADD_EXECUTABLE): Policy CMP0002 is not set: Logical target names must be globally unique. Run "cmake --help-policy CMP0002" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack (most recent call first): src/libmptk/CMakeLists.txt:160 (INCLUDE) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at CMake/buildEXECUTABLE.cmake:135 (ADD_CUSTOM_TARGET): Policy CMP0002 is not set: Logical target names must be globally unique. Run "cmake --help-policy CMP0002" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack (most recent call first): src/libmptk/CMakeLists.txt:160 (INCLUDE) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at CMake/buildEXECUTABLE.cmake:136 (ADD_EXECUTABLE): Policy CMP0002 is not set: Logical target names must be globally unique. Run "cmake --help-policy CMP0002" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack (most recent call first): src/libmptk/CMakeLists.txt:160 (INCLUDE) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at src/libdsp_windows/CMakeLists.txt:10 (ADD_CUSTOM_TARGET): Policy CMP0002 is not set: Logical target names must be globally unique. Run "cmake --help-policy CMP0002" for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at src/libdsp_windows/CMakeLists.txt:15 (ADD_LIBRARY): Policy CMP0002 is not set: Logical target names must be globally unique. Run "cmake --help-policy CMP0002" for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it. CMake Error at src/matlab/CMakeLists.txt:166 (ENDIF): endif An ENDIF command was found outside of a proper IF ENDIF structure. Or its arguments did not match the opening IF command. The end of a CMakeLists file was reached with an IF statement that was not closed properly. Within the directory: /Users/clayman/Desktop/MPTK-Source-0.5.4/src/matlab The arguments are: BUILD_MATLAB_MEX_FILES CMake Error at CMakeLists.txt:257 (ELSE): else An ELSE command was found outside of a proper IF ENDIF structure. Or its arguments did not match the opening IF command. CMake Error at CMakeLists.txt:266 (ENDIF): endif An ENDIF command was found outside of a proper IF ENDIF structure. Or its arguments did not match the opening IF command. The end of a CMakeLists file was reached with an IF statement that was not closed properly. Within the directory: /Users/clayman/Desktop/MPTK-Source-0.5.4 The arguments are: LINUX Configuring done You have changed variables that require your cache to be deleted. Configure will be re-run and you may have to reset some variables. The following variables have changed: CMAKE_CXX_COMPILER= /usr/bin/c++ thanks a lot |