(Re)installing an older version that's no longer installed Use -u when you know in advance that you will not want to go back to an older version, or you don't mind taking the extra steps below to reinstall the older version later if needed. sudo port -u upgrade tcl), MacPorts would uninstall the inactive versions after activating the latest one, so you would not be able to reactivate them later. $ sudo port uninstall tcl you used the -u flag when you upgraded the port (i.e. ![]() Once you're confident the new version works to your satisfaction, you can uninstall the old one to reclaim disk space: $ sudo port activate tcl Deactivating tcl Activating tcl similarly you can go back to the newer version. When you upgrade, a newer version of tcl will be installed and activated, while tcl will remain installed but will be deactivated:Īs long as it is still installed, you can reactivate tcl which will automatically deactivate the active version first: The following ports are currently installed: When you upgrade an installed port, MacPorts deactivates the older version but keeps it installed. Reactivating an older version that's still installed It's fine to do this in the course of trying to identify a problem, but once you have determined that a newer version is broken and that an older version works, please inform the developers of the affected software of the problem so that they can fix it, so that you can soon go back to using the latest versions of the software. Installing an older version of a port is not the intended way to use MacPorts, is not usually recommended, and may cause various problems. How to do this depends on whether you still have the older version installed. You can bypass it by editing nfĪnd removing "/opt/local/bin/no_default_gcc:" from the "binpath" again.MacPorts maintainers strive to give you the latest version of software in each port, but you may wish to use an older version for various reasons. If you encounter a port which triggers this errorīut you don't want to fix it immediately, Sudo cp -R no_default_gcc /opt/local/bin/ The above script will be found instead of the actual program Now anytime a port tries to use one of these unversioned programs, Edit the value of "binpath" in /opt/local/etc/macports/nf so that it begins with "/opt/local/bin/no_default_gcc:".Create symlinks " c++", " cpp", " g++", and " gcc", all pointing to the " cc" script.Create a script in that directory called " cc" that always prints an error message.Create a directory /opt/local/bin/no_default_gcc.It does this through the use of a number of similarly-named Tcl variables: MacPorts sets each of these variables to the right value for the user's Xcode version. There's also CXX for the C++ compiler and CPP for the C pre-processor. In fact there are more variables than just CC: It does this by specifying the desired compiler's complete path in the CC environment variableįor example, with Xcode 4.2 and later, CC is set to " /usr/bin/clang" ![]() MacPorts arranges for ports to compile by default using the same compiler that the installed version of Xcode would use,Īnd does not use the unpredictable " cc" or " gcc" symlinks. To remove this testing burden from maintainers,Īnd to prevent users from running into unanticipated problems, Most port authors will not have used " port select -set gcc $value"Īnd will therefore have the usual default version of gcc on their machine,Īnd will not have tested to see what happens if a different gcc is selected. ![]() So we cannot rely on " cc" oc " gcc" being any particular compiler. Users might also have created a " /opt/local/bin/gcc" symlink, pointing to any installed compiler, by using " port select -set gcc". If not instructed otherwise, most software builds C code using " cc" or " gcc".īut " /usr/bin/cc" and " /usr/bin/gcc" are not specific compilers they're symlinks to some suitable default compiler, but it varies based on Xcode version. The Xcode 4.6 release notes state that it is the last version of Xcode that will include llvm-gcc-4.2, which will leave only clang. With Xcode 4.2 or later, clang is the default and gcc is no longer included. With Xcode 4.0 and 4.1 on OS X 10.6 or 10.7, llvm-gcc-4.2 is the default. With Xcode 3.2 on OS X 10.6, llvm-gcc-4.2 and clang are also available gcc 4.2 is the default. With Xcode 3.1 on OS X 10.5, gcc 4.2 is also available. With Xcode 2.5 on OS X 10.4, gcc 3.3 and 4.0 are available, with 4.0 being the default. Much of the software in MacPorts is built using a C or C++ compiler,Īnd the various versions of Xcode for OS X come with different compiler suites and versions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |