Jump to content

Ktools doesn't work after successful installation (Mac)


inan

Recommended Posts

Hey guys,

 

I've been trying to have the make the ktools work for Mac. I was able to install ktools (krane and ktech), however when I try to convert a .tex to a .png and open the .png in photoshop, it always says:

 

"Cannot complete request because the file format module cannot parse the file."

 
 
I figured there was a problem in the compilation of the tools. I hope someone helps me find out what. Here is the detailed steps I have done so far:
 
1. Download ktools-4.1.2.zip, unzip it.
2. Download ImageMagick-6.9.1-0.pkg.zip, unzip it, and install the package at /opt/ImageMagick/
3. Download cmake-3.3.0-rc3-Darwin-x86_64.dmg, install it to Applications folder.
 
4. Run cmake via GUI. Specified the unzipped ktools-4.1.2 path and the build directory (an empty directory called ktools).
5. Press configure and choose Unix Makefiles and a pop up says:
 
"Error configuration process, project files may be invalid.
 
everything is a success until it reached to this:
------------- START -----------

Performing Test check_cxx_compiler_flag__mno_fma4 - Success

Performing Test check_cxx_compiler_flag__mno_avx2

Performing Test check_cxx_compiler_flag__mno_avx2 - Success

CMake Error at /Applications/CMake.app/Contents/share/cmake-3.2/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
Could NOT find ImageMagick (missing: ImageMagick_Magick++_LIBRARY
ImageMagick_MagickWand_LIBRARY ImageMagick_MagickCore_LIBRARY)
Call Stack (most recent call first):
/Applications/CMake.app/Contents/share/cmake-3.2/Modules/FindPackageHandleStandardArgs.cmake:374 (_FPHSA_FAILURE_MESSAGE)
/Applications/CMake.app/Contents/share/cmake-3.2/Modules/FindImageMagick.cmake:268 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:59 (FIND_PACKAGE)

 

Configuring incomplete, errors occurred!

See also "/Users/inan/Downloads/ktools/CMakeFiles/CMakeOutput.log".

See also "/Users/inan/Downloads/ktools/CMakeFiles/CMakeError.log".

------------END-------------

 

6. I edit one of the red lines that say CMAKE_INSTALL_PREFIX /usr/local and change it to /opt/ImageMagick and press generate again

and then it says this:

 

------------START-------------

CMake Warning at cmake/thirdparty/OptimizeForArchitecture.cmake:108 (message):
Your CPU (family 6, model 69) is not known. Auto-detection of optimization
flags failed and will use the 65nm Core 2 CPU settings.
Call Stack (most recent call first):
cmake/thirdparty/OptimizeForArchitecture.cmake:154 (AutodetectHostArchitecture)
CMakeLists.txt:49 (OptimizeForArchitecture)

 

Detected CPU: merom

Found ImageMagick: /opt/ImageMagick/lib/libMagick++-6.Q16.dylib

Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)

Looking for floor in m

Looking for floor in m - found

Looking for C++ include cstddef

Looking for C++ include cstddef - found

Looking for inttypes.h

Looking for inttypes.h - found

Looking for C++ include sstream

Looking for C++ include sstream - found

Check size of long long

Check size of long long - done

Looking for snprintf

Looking for snprintf - found

Check size of mode_t

Check size of mode_t - done

Performing Test HAVE_RESTRICT

Performing Test HAVE_RESTRICT - Failed

Performing Test HAVE___RESTRICT

Performing Test HAVE___RESTRICT - Success

Configuring done

------------END-------------

 

But it still has two things in red. They are as follows:

 

LIBZIP_INCLUDE_DIR

LIBZIP_LIBRARY

 

7. So I revert to CMAKE_INSTALL_PREFIX back to /usr/local and press generate. And here is the result:

 

------------START-------------

CMake Warning at cmake/thirdparty/OptimizeForArchitecture.cmake:108 (message):
Your CPU (family 6, model 69) is not known. Auto-detection of optimization
flags failed and will use the 65nm Core 2 CPU settings.
Call Stack (most recent call first):
cmake/thirdparty/OptimizeForArchitecture.cmake:154 (AutodetectHostArchitecture)
CMakeLists.txt:49 (OptimizeForArchitecture)

 

Detected CPU: merom

Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)

Configuring done

------------END-------------

 

8. I go to ktools directory and run: make; make install. And then check ktech and krane and show the help documentation via --help parameter.

 

9. Then I use the ktech and krane but the am having errors reading the .png generated.

 

 

So, I'm thinking that although I was able to build the ktools, it has corrupted it because of this:

 

missing: PKG_CONFIG_EXECUTABLE

 

 

 

Wondering where I could be wrong. I hope someone helps. I've been working on it for days. (and yes, I have an 8-5 job so I only get to sleep 3-4 per night. I'm working on some scripted mods -- ones that don't need tex files).

 

 

Link to comment
Share on other sites

Hey guys, need some help here.

 

I removed every package installed related to modding DS and tried starting from scratch. 

Here is the summary of what I did:

 

Download the following:
1. xcode from App Store (2.6GB)
2. cmake source code for MacOs (http://www.cmake.org/download/)
3. ImageMagick source code for MacOS (http://www.imagemagick.org/script/install-source.php)
4. ktools source code (https://github.com/nsimplex/ktools/)
 
Preparations:
1. switch user to root: sudo su -
2. copy the three downloaded files to /opt: cp <file> /opt/
3. go back to /opt after each successful install.
 
Install Xcode:
1. Automatic via App Store.
2. Agree to the license.
 
Install Cmake:
1. tar -xvzf cmake-3.2.3.tar.gz
2. cd cmake-3.2.3/
3. ./bootstrap
4. make
5. make install
 
Install ImageMagick
1. tar -xvzf ImageMagick.tar.gz
2. cd ImageMagick-6.9.1-8/
3. ./configure
4. make
5. make install
6. (to test) convert logo: logo.gif
 
Install ktools
1. unzip ktools-4.1.2-source.zip
2. cd ktools-4.1.2/
3. ./configure
4. make
5. make install
 
 
I was able to use ktech and krane, but for some reason the converted files are always unreadable. I always encounter this error when trying to read or open the converted .png file:
 
"Cannot complete request because the file format module cannot parse the file."
 
I really hope someone can help me here. :(
Link to comment
Share on other sites

Still unable to succeed in conversions using ktech.

 

After installing xcode, cmake, imagemagick and ktools. I am having this error when converting a .png to .tex:

 

Error: ktech: no decode delegate for this image format `PNG' @ error/constitute.c/ReadImage/501

 

When i convert .tex to .png, the resulting .png is always unreadable.

What could have been wrong?

 

 

@simplex, or anyone, please help. Thanks in advance.

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...