#34233: apple-gcc42 doesn't honor -isysroot correctly -----------------------------------+---------------------------------------- Reporter: jeremyhu@… | Owner: royliu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: | Port: apple-gcc42 -----------------------------------+---------------------------------------- Comment(by jeremyhu@…): Use -v with a sample compile, and you will see. The problem is that -I/opt/local/include becomes ${SDKROOT}/usr/include. So a case where this fails is for anything built which wants to use anything from MacPorts. Without -isysroot, gcc -v shows the search path as: {{{ /opt/local/include /usr/local/include /opt/local/lib/apple-gcc42/gcc/i686-apple-darwin12/4.2.1/include /usr/include /System/Library/Frameworks (framework directory) /Library/Frameworks (framework directory) }}} With -isysroot and my patch, gcc shows it as: {{{ /opt/local/include /opt/local/lib/apple-gcc42/gcc/i686-apple-darwin12/4.2.1/include ${SDKROOT}/usr/include ${SDKROOT}/System/Library/Frameworks (framework directory) }}} ie, it looks for /usr/{local/,}include and {/S,}/L/F content inside the SDKROOT but not the compiler's internals. Your patch doesn't match that behavior. It does as you described above. #1 is correct. #2 isn't. -- Ticket URL: <https://trac.macports.org/ticket/34233#comment:17> MacPorts <http://www.macports.org/> Ports system for Mac OS