Skip to content

Frequently Asked Questions

Tojo Saki edited this page Jul 13, 2017 · 7 revisions

This FAQ tries to answer specific questions concerning µ.

Build

How to use multi-process compiling?

MSVC on Windows, Qt Creator will use jom to distributes compiliation process on multiple cores. To enable/disable this feature, click 'Tools' in Qt Creator, and then 'Options'. On the left panel, select 'Build & Run', click 'General' tab, and then check/uncheck box the 'Use jom instead of nmake' to enable/disable this feature.

For LLVM on Mac OS X or GCC on Windows and Linux, to enable multiple process compiling, click 'Project' on the left bar. Scroll down to 'Build Steps'. Click the 'details' of the 'Make' row. At the 'Make parameters' part, input -jx. 'x' should be the number of process you want. It should normally to be the cores of your processors. e.g. For dual core processors, it should be -j2. On the next time you compile the project, it should use multi-process compiling.

How to fix dyld: Symbol not found: __cg_jpeg_resync_to_restart error when compiling under Mac OS X?

This is a dynamic-linking-conflict between different libjpeg dynamic libraries on Mac OS X. First there is a standard native libJPEG.dylib (in /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/). But when we are using HomeBrew or MacPorts, you can also have a port-related libjpeg.dylib in (in /opt/local/lib).

This creates a problem when you link against your system libJPEG (which is preferred). Then if /opt/local/lib is in DYLD_LIBRARY_PATH, that path will be prioritised when searching for a dynamic lib, resulting in a runtime error when loading symbols:

dyld: Symbol not found: __cg_jpeg_resync_to_restart
  Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
  Expected in: /usr/local/lib//libJPEG.dylib
 in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO

This explanation is basically from StackOverflow by kamjagin. A hack way to solve this problem is to create a symbol link. The command is:

sudo ln -sf /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib /usr/local/lib/libJPEG.dylib

The libJPEG.dylib, libTIFF.dylib and libPng.dylib will all facing this problem. For libPng.dylib and libTIFF.dylib, the following commands will create their symbol links:

sudo ln -sf /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib /usr/local/lib/libpng.dylib
sudo ln -sf /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib /usr/local/lib/libTIFF.dylib

HomeBrew

How to fix curl: (60) SSL certificate: Invalid certificate chain error when installing FFMpeg?

This error is caused by the SSL certification of ffmpeg.org. On Mac OS X, to make it trust the certification, you need to access it with Safari.

This is an answer copied from StackOverflow by Lewis Buckley to solve to SSL certificate chain problem for another website below, what you need to do is to change the url https://registry.npmjs.org to https://ffmpeg.org:

Using the Safari browser (not Chrome, Firefox or Opera) on Mac OS X 10.9 (Mavericks) visit https://registry.npmjs.org

Click the Show certificate button and then check the checkbox labelled Always trust. Then click Continue and enter your password if required.

Curl should now work with that URL correctly.