#59091 closed defect (duplicate)
Poppler Build Failure XCODE 11.0 no such sysroot directory
Reported by: | mrspambucket | Owned by: | dbevans (David B. Evans) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: | poppler |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
[ 87%] Generating Poppler-0.18.gir clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk' [-Wmissing-sysroot] In file included from /Users/mark/Downloads/poppler-0.80.0/build/glib/tmp-introspect4ngthuit/Poppler-0.18.c:2: In file included from /opt/local/include/glib-2.0/glib.h:30: In file included from /opt/local/include/glib-2.0/glib/galloca.h:32: /opt/local/include/glib-2.0/glib/gtypes.h:35:10: fatal error: 'time.h' file not found #include <time.h> ^~~~~~~~ 1 error generated. Traceback (most recent call last): File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/unixccompiler.py", line 118, in _compile extra_postargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/ccompiler.py", line 909, in spawn spawn(cmd, dry_run=self.dry_run) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/spawn.py", line 36, in spawn _spawn_posix(cmd, search_path, dry_run=dry_run) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/spawn.py", line 159, in _spawn_posix % (cmd, exit_status)) distutils.errors.DistutilsExecError: command '/usr/bin/clang' failed with exit status 1 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/local/bin/g-ir-scanner", line 96, in <module> sys.exit(scanner_main(sys.argv)) File "/opt/local/lib/gobject-introspection/giscanner/scannermain.py", line 547, in scanner_main shlibs = create_binary(transformer, options, args) File "/opt/local/lib/gobject-introspection/giscanner/scannermain.py", line 418, in create_binary gdump_parser.get_error_quark_functions()) File "/opt/local/lib/gobject-introspection/giscanner/dumper.py", line 294, in compile_introspection_binary return dc.run() File "/opt/local/lib/gobject-introspection/giscanner/dumper.py", line 168, in run introspection_obj = self._compile(c_path) File "/opt/local/lib/gobject-introspection/giscanner/dumper.py", line 197, in _compile self._options.init_sections) File "/opt/local/lib/gobject-introspection/giscanner/ccompiler.py", line 250, in compile output_dir=os.path.abspath(os.sep)) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/ccompiler.py", line 574, in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/unixccompiler.py", line 120, in _compile raise CompileError(msg) distutils.errors.CompileError: command '/usr/bin/clang' failed with exit status 1 make[2]: *** [glib/Poppler-0.18.gir] Error 1 make[1]: *** [glib/CMakeFiles/gir-typelibs.dir/all] Error 2 make: *** [all] Error 2
Change History (5)
comment:1 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Keywords: | Poppler Xcode removed |
Owner: | set to dbevans |
Port: | poppler added; Poppler removed |
Status: | new → assigned |
comment:2 follow-up: 3 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)
Or did you perhaps install Xcode 11, which does not have the 10.14 SDK anymore like Xcode 10 did but which instead now has the 10.15 SDK? If so, we'll have to identify why the path to the 10.14 SDK is still being used (maybe it's baked into the files installed by some other ports that are dependencies of poppler). There are other tickets about that.
comment:3 Changed 5 years ago by dbevans (David B. Evans)
Replying to ryandesign:
Or did you perhaps install Xcode 11, which does not have the 10.14 SDK anymore like Xcode 10 did but which instead now has the 10.15 SDK? If so, we'll have to identify why the path to the 10.14 SDK is still being used (maybe it's baked into the files installed by some other ports that are dependencies of poppler). There are other tickets about that.
@ryandesign I'm seeing this with other ports as well. And I'm thinking that the problem has to do with mixing ports that are prebuilt using Xcode10 (either locally or installing a binary archive) which uses the Xcode10 sdk and others built with Xcode11 which now uses the sdk from CommandLineTools. In brief, the sysroots for these two situations are different and vestiges of the old sysroot are baked into some binaries as you say. This is only a problem on Mojave transitioning from Xcode10 to Xcode11 and should not be an issue with Xcode11 on Catalina since all ports will be rebuilt using the same configuration.
So I see two fixes
1) Don't use Xcode11 on Mojave but stay with say Xcode10.3 or 2)Upgrade to Xcode11 and treat it as the same issue as migrating from one OS version to the next. The other gotcha is that you have to use port -s install when rebuilding ports to avoid fetching old incompatible 10.14 archives.
I'm testing this is a limited way (just poppler and dependencies) on a separate machine to see if this theory bears out with the case at hand.
comment:4 Changed 5 years ago by jmroot (Joshua Root)
Resolution: | → duplicate |
---|---|
Status: | assigned → closed |
comment:5 Changed 5 years ago by dbevans (David B. Evans)
In this case, gobject-introspection is passing flags from when it was built, not the new ones that you are using to build poppler. Rebuilding all poppler dependencies as well as poppler after installing Xcode11 yields a working build.
Here's what I did (refer to the Migration instructions for details
Install the following:
- Xcode 11 (only provides 10.15 sdk not 10.14)
- Command Line Tools for Xcode 11 (developer download) (Includes sdks for both 10.14/10.15)
- MacPorts 2.6.0
Make a list of ports installed (for later use) and uninstall them
- sudo port uninstall installed
Install poppler using source build option to avoid ports built with previous versions
- sudo port -s install poppler
So this is not a problem with poppler per se or gobject-introspection, but a case of mixed ports built with different (conflicting) build environments.
Please remember to use WikiFormatting.
Your log mentions the directory /Users/mark/Downloads/poppler-0.80.0. Are you compiling poppler manually or using the poppler port in MacPorts? If the former, it may be outside of the scope of what we can help you with.
Your log mentions that the directory /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk does not exist. Is that true? If so, why is it true? Did you forget to install Xcode?