How do I instruct CMake to look for libraries installed by MacPorts?

Add /opt/local/lib, and any other likely install paths, to the set of paths searched by cmake in your CMakeLists.txt file: set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /opt/local/lib) This appends /opt/local/lib to the set of paths in which cmake searches for libraries. This CMAKE_LIBRARY_PATH technique will affect all find_library commands after you set the variable. For a more surgical, library-by-library … Read more

Unable to update my Bash in Mac by MacPorts

Run the following code, for instance to change your shell to the newest Bash installed by MacPorts chsh -s /opt/local/bin/bash If that gives you the message, “non-standard shell“ you will need to add /opt/local/bin/bash to /etc/shells Note that /etc/shells is just a text file, so you can edit it directly if you authenticate as root. … Read more

Why does Macports take FOREVER to build simple packages?

If you are running on an Intel Core 2 Duo you can double the speed of your builds by changing the Macports config option located here: /opt/local/etc/macports/macports.conf # Number of simultaneous make jobs (commands) to use when building ports buildmakejobs 2 I was kicking myself when I discovered this AFTER I rebuilt gcc 😉 This … Read more

How to use the gcc installed in macports?

You can control the symlink in /opt/local/bin/gcc by using port select. You can see available version using port select –list gcc. Anything listed with mp- as prefix refers to MacPorts’ own port, gcc42 and llvm-gcc42 refer to the compilers shipped with Xcode by Apple. Example from my system: $ port select –list gcc Available versions … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)