Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build errors on macOS 10.15.7 on MacBook Pro 16-inch 2019 #869

Closed
Quantumpanda opened this issue Apr 11, 2021 · 2 comments
Closed

Build errors on macOS 10.15.7 on MacBook Pro 16-inch 2019 #869

Quantumpanda opened this issue Apr 11, 2021 · 2 comments

Comments

@Quantumpanda
Copy link

Okay, so this may not be the right place for this, but I don't know where else to report this.

For a long time, I've been using the long-out-of-date dupeguru PE 2.10.0 to help manage my images on my older MacBook Pro (17-inch, 2010) under Mac OS X 10.12. I upgraded to a 2019 16-inch MacBook Pro last year, and it is currently running macOS 10.15.7.

I just this week attempted to use the old dupeguru PE on my image collection for the first time on this MBP, and it crashed while I was going through its results. I figured that part of the problem might be that it's a really old version, so I tracked down the information for the current versions.

I first tried the pre-built version 4.0.3, but that crashed while scanning. Since you're not taking bug reports for 4.0.3 anymore, I decided to try building the current version (4.1.0). As a developer, I'm a rank novice, still learning the basics, but I know enough to know how to follow build instructions.

I tried both the Cocoa build and the Qt build, and both failed with the same set of errors. The primary error, repeated many times, is "architecture not supported".

As I said, I'm a novice here. While I know conceptually what this error means, I have no idea how to address it, or even whether it's something I can address. The 2019 MacBook Pro is an Intel-based system, not one of the M1-based models. It runs only 64-bit apps, but that doesn't appear to be an issue. And while macOS 11 (Big Sur) is the most current version, 10.15.7 (Catalina) is the most recent previous version, and should not pose an issue.

I have successfully built packages from fink on this system, so I know Xcode itself and the Command Line Tools should be functional. xcodebuild --version returns the version as Xcode 12.4, build 12D4e. My Python3 install is version 3.8.2, and my Python 2 is version 2.7.16.

Build output from Qt build attempt as follows. Output from Cocoa build attempt is functionally the same.

$ python build.py
Building dupeGuru with UI qt
Building dupeGuru
Building PE Modules
running build_ext
building '_block' extension
creating build/temp.macosx-10.14.6-x86_64-3.8
creating build/temp.macosx-10.14.6-x86_64-3.8/core
creating build/temp.macosx-10.14.6-x86_64-3.8/core/pe
creating build/temp.macosx-10.14.6-x86_64-3.8/core/pe/modules
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -I/Users/qpanda/Documents/GitHub/dupeguru/env/include -I/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c core/pe/modules/block.c -o build/temp.macosx-10.14.6-x86_64-3.8/core/pe/modules/block.o
In file included from core/pe/modules/block.c:10:
In file included from core/pe/modules/common.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include/limits.h:21:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/limits.h:63:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture
#error Unsupported architecture
^
In file included from core/pe/modules/block.c:10:
In file included from core/pe/modules/common.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include/limits.h:21:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/limits.h:64:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/limits.h:8:2: error: architecture not
supported
#error architecture not supported
^
In file included from core/pe/modules/block.c:10:
In file included from core/pe/modules/common.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:71:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:33:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/_types.h:34:2: error: architecture not
supported
#error architecture not supported
^
In file included from core/pe/modules/block.c:10:
In file included from core/pe/modules/common.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:71:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:27:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:55:9: error: unknown type name
'__int64_t'
typedef __int64_t __darwin_blkcnt_t; /* total blocks /
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:56:9: error: unknown type name
'__int32_t'; did you mean '__int128_t'?
typedef __int32_t __darwin_blksize_t; /
preferred block size /
^
note: '__int128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:57:9: error: unknown type name
'__int32_t'; did you mean '__int128_t'?
typedef __int32_t __darwin_dev_t; /
dev_t /
^
note: '__int128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:60:9: error: unknown type name
'__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_gid_t; /
[???] process and group IDs /
^
note: '__uint128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:61:9: error: unknown type name
'__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_id_t; /
[XSI] pid_t, uid_t, or gid_t*/
^
note: '__uint128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:62:9: error: unknown type name
'__uint64_t'
typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes /
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:68:9: error: unknown type name
'__darwin_natural_t'
typedef __darwin_natural_t __darwin_mach_port_name_t; /
Used by mach /
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:70:9: error: unknown type name
'__uint16_t'; did you mean '__uint128_t'?
typedef __uint16_t __darwin_mode_t; /
[???] Some file attributes /
^
note: '__uint128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:71:9: error: unknown type name
'__int64_t'
typedef __int64_t __darwin_off_t; /
[???] Used for file sizes /
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:72:9: error: unknown type name
'__int32_t'; did you mean '__int128_t'?
typedef __int32_t __darwin_pid_t; /
[???] process and group IDs /
^
note: '__int128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:73:9: error: unknown type name
'__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_sigset_t; /
[???] signal set /
^
note: '__uint128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:74:9: error: unknown type name
'__int32_t'; did you mean '__int128_t'?
typedef __int32_t __darwin_suseconds_t; /
[???] microseconds /
^
note: '__int128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:75:9: error: unknown type name
'__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_uid_t; /
[???] user IDs /
^
note: '__uint128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:76:9: error: unknown type name
'__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_useconds_t; /
[???] microseconds */
^
note: '__uint128_t' declared here
In file included from core/pe/modules/block.c:10:
In file included from core/pe/modules/common.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:71:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:43:9: error: unknown type name
'__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_wctype_t;
^
note: '__uint128_t' declared here
In file included from core/pe/modules/block.c:10:
In file included from core/pe/modules/common.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:75:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_va_list.h:31:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/types.h:37:2: error: architecture not
supported
#error architecture not supported
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command 'clang' failed with exit status 1

@arsenetar
Copy link
Owner

For some reason the python module is trying to build for -arch arm64 -arch x86_64, since the arm architecture is not supported it is throwing these. It seems it might have to do with the flags the apple built the provided python in, you may be able to get around it by exporting an environment variable before building export ARCHFLAGS="-arch x86_64" found this information here: giampaolo/psutil#1832.

You may be interested in the Packaging of 4.1.1 for macOS which has some "beta" packages to get feedback on: #761. The Qt version only works on m1 right now due to figuring out how to get some dependencies built universal2. The cocoa version should run on intel platforms.

@arsenetar
Copy link
Owner

Packaging is now working for macOS. If there are still issues I would recommend my suggestion in the previous comment. Closing as this seems to be a macOS / python issue and not able to reproduce it locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants