我正在尝试安装适用于 OSX 的 WFDB 软件,来源这里.我跑
sudo make install
我明白了
cd lib; /Applications/Xcode.app/Contents/Developer/usr/bin/make install
cp -p wfdblib.h /usr/include/wfdb; chmod 644 /usr/include/wfdb/wfdblib.h
cp -p ecgcodes.h /usr/include/wfdb
chmod 644 /usr/include/wfdb/ecgcodes.h
cp -p ecgmap.h /usr/include/wfdb
chmod 644 /usr/include/wfdb/ecgmap.h
/Applications/Xcode.app/Contents/Developer/usr/bin/make clean # force recompilation since config may have changed
rm -f wfdbinit.o annot.o signal.o calib.o wfdbio.o libwfdb.* *.dll *~
/Applications/Xcode.app/Contents/Developer/usr/bin/make all
sed "s+DBDIR+/usr/database+" <wfdblib.h0 >wfdblib.h
gcc -fPIC -fno-common -g -O -DWFDB_MAJOR=10 -DWFDB_MINOR=5 -DWFDB_RELEASE=22 -DNOVALUES_H `curl-config --cflags` -I/usr/include -arch i386 -arch x86_64 -arch ppc -c -o wfdbinit.o wfdbinit.c
In file included from wfdbinit.c:33:
In file included from ./wfdblib.h:34:
In file included from ./wfdb.h:417:
In file included from /usr/include/unistd.h:71:
In file included from /usr/include/_types.h:27:
In file included from /usr/include/sys/_types.h:32:
/usr/include/sys/cdefs.h:655:2: error: Unsupported architecture
#error Unsupported architecture
^
In file included from wfdbinit.c:33:
In file included from ./wfdblib.h:34:
In file included from ./wfdb.h:417:
In file included from /usr/include/unistd.h:71:
In file included from /usr/include/_types.h:27:
In file included from /usr/include/sys/_types.h:33:
/usr/include/machine/_types.h:34:2: error: architecture not supported
#error architecture not supported
^
In file included from wfdbinit.c:33:
In file included from ./wfdblib.h:34:
In file included from ./wfdb.h:417:
In file included from /usr/include/unistd.h:71:
In file included from /usr/include/_types.h:27:
/usr/include/sys/_types.h:94:9: error: unknown type name '__int64_t'
typedef __int64_t __darwin_blkcnt_t; /* total blocks */
^
/usr/include/sys/_types.h:95:9: error: unknown type name '__int32_t'
typedef __int32_t __darwin_blksize_t; /* preferred block size */
^
/usr/include/sys/_types.h:96:9: error: unknown type name '__int32_t'
typedef __int32_t __darwin_dev_t; /* dev_t */
^
/usr/include/sys/_types.h:99:9: error: unknown type name '__uint32_t'
typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */
^
/usr/include/sys/_types.h:100:9: error: unknown type name '__uint32_t'
typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/
^
/usr/include/sys/_types.h:101:9: error: unknown type name '__uint64_t'
typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */
^
/usr/include/sys/_types.h:107:9: error: unknown type name '__darwin_natural_t'
typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
^
/usr/include/sys/_types.h:109:9: error: unknown type name '__uint16_t'
typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */
^
/usr/include/sys/_types.h:110:9: error: unknown type name '__int64_t'
typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */
^
/usr/include/sys/_types.h:111:9: error: unknown type name '__int32_t'
typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */
^
/usr/include/sys/_types.h:131:9: error: unknown type name '__uint32_t'
typedef __uint32_t __darwin_sigset_t; /* [???] signal set */
^
/usr/include/sys/_types.h:132:9: error: unknown type name '__int32_t'
typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */
^
/usr/include/sys/_types.h:133:9: error: unknown type name '__uint32_t'
typedef __uint32_t __darwin_uid_t; /* [???] user IDs */
^
/usr/include/sys/_types.h:134:9: error: unknown type name '__uint32_t'
typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */
^
In file included from wfdbinit.c:33:
In file included from ./wfdblib.h:34:
In file included from ./wfdb.h:417:
In file included from /usr/include/unistd.h:75:
/usr/include/sys/_types/_intptr_t.h:30:9: error: unknown type name '__darwin_intptr_t'; did you mean
'__darwin_ino_t'?
typedef __darwin_intptr_t intptr_t;
^
/usr/include/sys/_types.h:103:26: note: '__darwin_ino_t' declared here
typedef __darwin_ino64_t __darwin_ino_t; /* [???] Used for inodes */
^
In file included from wfdbinit.c:33:
In file included from ./wfdblib.h:34:
In file included from ./wfdb.h:417:
In file included from /usr/include/unistd.h:80:
/usr/include/sys/_types/_size_t.h:30:9: error: unknown type name '__darwin_size_t'; did you mean
'__darwin_ino_t'?
typedef __darwin_size_t size_t;
^
/usr/include/sys/_types.h:103:26: note: '__darwin_ino_t' declared here
typedef __darwin_ino64_t __darwin_ino_t; /* [???] Used for inodes */
^
In file included from wfdbinit.c:33:
In file included from ./wfdblib.h:34:
In file included from ./wfdb.h:417:
In file included from /usr/include/unistd.h:81:
/usr/include/sys/_types/_ssize_t.h:30:9: error: unknown type name '__darwin_ssize_t'
typedef __darwin_ssize_t ssize_t;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [wfdbinit.o] Error 1
make[1]: *** [install] Error 2
make: *** [install] Error 2
create a new version of this paste
解决架构问题的方法是什么? 我个人认为这个问题很大,无法快速解决。不过,我可能错了。
答案1
从构建命令中删除“-arch ppc”选项。该选项指定针对 PowerPC 进行构建,而许多版本的构建工具都不支持该选项。
这WFDB Mac OS X 快速入门页面有说明在底部有关如何调整配置以关闭 PowerPC 的构建。一般来说,您应该仔细阅读该页面。