[SR-2945] build-script chokes on unknown OS #45539
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
build-script
Area → utils: The build script
compiler
The Swift compiler in itself
Environment
Joyent SmartOS native zone, excerpt from zonefile
"image_uuid": "13f711f4-499f-11e6-8ea6-2b9fb858a619",
"max_physical_memory": 512,
"quota": 20
Additional Detail from JIRA
md5: 0d5d4351c078d172749b3cdf3a2c90a3
Issue Description:
Based off of:
$ cat /tmp/test.py
import os
import platform
print platform.system()
print platform.machine()
$ python /tmp/test.py
SunOS
i86pc
https://github.com/TyrfingMjolnir/swift/blob/master/utils/swift_build_support/swift_build_support/targets.py
20161020 12:30 Not yet functional, but gets one step further into the process
# ./swift/utils/build-script -R
Traceback (most recent call last):
File "./swift/utils/build-script", line 2150, in
sys.exit(main())
File "./swift/utils/build-script", line 2146, in main
return main_normal()
File "./swift/utils/build-script", line 2069, in main_normal
toolchain = host_toolchain(xcrun_toolchain=args.darwin_xcrun_toolchain)
File "/opt/local/src/swift/swift/utils/swift_build_support/swift_build_support/toolchain.py", line 180, in host_toolchain
'toolchain() is not supported in this platform')
NotImplementedError: toolchain() is not supported in this platform
https://github.com/TyrfingMjolnir/swift/blob/master/utils/swift_build_support/swift_build_support/toolchain.py
20161020 15:55 Updated some more:
# ./swift/utils/build-script -R
./swift/utils/build-script: fatal error: can't find clang (please install clang-3.5 or a later version)
20161020 19:25 current status
# ./swift/utils/build-script -R
Unknown compiler deployment target: sunos-x86_64
./swift/utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting
20161014 14:30-ish $ uname -a
SunOS swift01 5.11 joyent_20160512T071413Z i86pc i386 i86pc Solaris
$ whoami
swift
$ pkgin in git tmux ninja-build
$ pkg_add http://pkgsrc.joyent.com/packages/SmartOS/2015Q4/x86_64/All/clang-3.7.0.tgz
$ mkdir -p /opt/local/src/swift
$ cd /opt/local/src/swift
$ git clone https://github.com/apple/swift.git
$ cd swift
$ ./swift/utils/update-checkout --clone
It does not really matter which parameter I put in, the error appears to be the same( some python error ): AttributeError: 'NoneType' object has no attribute 'name'
1275: default=StdlibDeploymentTarget.host_target().name)
$ ./swift/utils/build-script -x
Traceback (most recent call last):
File "./swift/utils/build-script", line 2149, in
sys.exit(main())
File "./swift/utils/build-script", line 2145, in main
return main_normal()
File "./swift/utils/build-script", line 1275, in main_normal
default=StdlibDeploymentTarget.host_target().name)
AttributeError: 'NoneType' object has no attribute 'name'
$ ./swift/utils/build-script --?
Traceback (most recent call last):
File "./swift/utils/build-script", line 2149, in
sys.exit(main())
File "./swift/utils/build-script", line 2145, in main
return main_normal()
File "./swift/utils/build-script", line 1275, in main_normal
default=StdlibDeploymentTarget.host_target().name)
AttributeError: 'NoneType' object has no attribute 'name'
$ ./swift/utils/build-script --help
Traceback (most recent call last):
File "./swift/utils/build-script", line 2149, in
sys.exit(main())
File "./swift/utils/build-script", line 2145, in main
return main_normal()
File "./swift/utils/build-script", line 1275, in main_normal
default=StdlibDeploymentTarget.host_target().name)
AttributeError: 'NoneType' object has no attribute 'name'
$ ./swift/utils/build-script -R
Traceback (most recent call last):
File "./swift/utils/build-script", line 2149, in
sys.exit(main())
File "./swift/utils/build-script", line 2145, in main
return main_normal()
File "./swift/utils/build-script", line 1275, in main_normal
default=StdlibDeploymentTarget.host_target().name)
AttributeError: 'NoneType' object has no attribute 'name'
$ pkgin ls
autoconf-2.69nb6 Generates automatic source code configuration scripts
automake-1.15nb3 GNU Standards-compliant Makefile generator
binutils-2.26nb1 GNU binary utilities
bison-3.0.4nb2 GNU yacc(1) replacement
bmake-20150505 Portable (autoconf) version of NetBSD 'make' utility
bootstrap-mk-files-20160411 *.mk files for the bootstrap bmake utility
bsdinstall-20160108 Portable version of the BSD install(1) program
build-essential-1.2 Meta-package for essential build utilities
bzip2-1.0.6nb1 Block-sorting file compressor
changepass-1.3.3 Simple tool to set user passwords non-interactively
cmake-3.5.2 Cross platform make
coreutils-8.25 GNU basic file, shell and text manipulation utilities
curl-7.49.1 Client that groks URLs
cyrus-sasl-2.1.26nb4 Simple Authentication and Security Layer
db4-4.8.30 Berkeley DB version 4 from Oracle
diffutils-3.3 GNU diff utilities - find the differences between files
expat-2.2.0 XML parser library written in C
findutils-4.6.0nb1 The GNU find, locate, updatedb, and xargs utilities
fontconfig-2.12.0 Library for configuring and customizing font access
freetype2-2.6.3 Font rendering engine and library API
gawk-4.1.3 GNU awk
gcc47-libs-4.7.4nb2 The GNU Compiler Collection (GCC) support shared libraries
gcc49-4.9.3nb1 The GNU Compiler Collection (GCC) - 4.9 Release Series
gcc49-libs-4.9.3nb2 The GNU Compiler Collection (GCC) support shared libraries
gettext-lib-0.19.8.1 Internationalized Message Handling Library (libintl)
git-2.9.0 GIT version control suite meta-package
git-base-2.9.0 GIT Tree History Storage Tool (base package)
git-contrib-2.9.0 GIT Tree History Storage Tool (contrib)
git-docs-2.9.0 GIT Tree History Storage Tool (documentation)
git-gitk-2.9.0 GIT Tree History Storage Tool (gitk)
gmake-4.2.1 GNU version of 'make' utility
gmp-6.1.0 Library for arbitrary precision arithmetic
grep-2.24 GNU grep
gsed-4.2.2nb4 GNU implementation of sed, the POSIX stream editor
gtar-base-1.29 The GNU tape archiver with remote magnetic tape support
icu-57.1 Robust and full-featured Unicode services
less-481 Pager similar to more and pg
libX11-1.6.3 Base X libraries from modular Xorg X11
libXau-1.0.8 Authorization Protocol for X from X.org
libXdmcp-1.1.2 X Display Manager Control Protocol library from X.org
libXext-1.3.3 X Extension library
libXft-2.3.2 Library for configuring and customizing font access
libXrender-0.9.9 X Render Library
libarchive-3.2.1nb1 Library to read/create different archive formats
libestr-0.1.10 Library for some string essentials
libevent-2.0.22nb1 Asynchronous event notification library
libfastjson-0.99.2 Fast json library for C
libffi-3.2.1nb1 Foreign function interface
libiconv-1.14nb2 Character set conversion library
libidn-1.32 Internationalized Domain Names command line tool
liblogging-1.0.5 Easy to use logging library
liblognorm-1.1.3 Tool to normalize log data
libssh2-1.7.0nb1 SSH2 protocol library
libtool-2.4.2nb2 Generic shared library support script
libtool-base-2.4.2nb12 Generic shared library support script (the script itself)
libtool-fortran-2.4.2nb5 Generic shared library support script (the script itself, incl. Fortran)
libtool-info-2.4.2 Generic shared library support script - info pages
libuuid-2.28 Generate unique identifiers for objects
libxcb-1.12 X protocol C-language Binding
m4-1.4.17 GNU version of UNIX m4 macro language processor
mit-krb5-1.14.1nb2 MIT Kerberos 5 authentication system
mozilla-rootcerts-1.0.20150804nb1 Root CA certificates from the Mozilla Project
mpfr-3.1.4 GMP-based library for multiple-precision floating-point computations
nawk-20121220nb1 Brian Kernighan's pattern-directed scanning and processing language
nbsed-20120308 NetBSD-current's sed(1)
ncurses-6.0nb1 CRT screen handling and optimization package
ninja-build-1.7.1 Ninja is a small build system with a focus on speed
nodejs-6.2.2 V8 JavaScript for clients and servers
openldap-client-2.4.44nb2 Lightweight Directory Access Protocol libraries and client programs
openssl-1.0.2hnb1 Secure Socket Layer and cryptographic library
p5-Authen-SASL-2.16nb4 Perl module to handle SASL authentication
p5-Digest-HMAC-1.03nb6 Perl5 module for HMAC
p5-Email-Valid-1.200nb1 Perl5 module for testing validity of an email address
p5-Error-0.17024nb2 Perl extension module for try/throw/catch exception handling
p5-GSSAPI-0.28nb7 Perl extension providing access to the GSSAPIv2 library
p5-IO-CaptureOutput-1.11.04nb2 Capture STDOUT and STDERR from Perl code, subprocesses, or XS
p5-IO-Socket-INET6-2.72nb2 Perl object interface for AF_INET|AF_INET6 domain sockets
p5-IO-Socket-SSL-2.027nb1 Perl5 SSL socket interface class
p5-MailTools-2.18nb1 Perl5 modules related to mail applications
p5-Mozilla-CA-20160104nb1 Mozilla's CA cert bundle for Perl
p5-Net-DNS-1.06nb1 Perl5 module for DNS resolution
p5-Net-Domain-TLD-1.74nb1 Work with TLD names
p5-Net-IP-1.26nb4 Perl extension for manipulating IPv4/IPv6 addresses
p5-Net-LibIDN-0.12nb8 Perl bindings for GNU Libidn
p5-Net-SMTP-SSL-1.03nb1 Perl5 module providing SSL support for Net::SMTP
p5-Net-SSLeay-1.74nb1 Perl5 module for using OpenSSL
p5-Socket6-0.27nb1 Perl5 module to support getaddrinfo() and getnameinfo()
p5-TimeDate-2.30nb3 Perl5 TimeDate distribution
patch-2.7.5 Patch files using diff output
pcre-8.39 Perl Compatible Regular Expressions library
perl-5.24.0 Practical Extraction and Report Language
pkg_alternatives-1.6 Generic wrappers for programs with similar interfaces
pkg_install-20160410nb1 Package management and administration tools for pkgsrc
pkg_install-info-4.5nb3 Standalone GNU info file installation utility
pkgin-0.9.4nb2 Apt / yum like tool for managing pkgsrc binary packages
pkgsrc-gnupg-keys-20160519 GnuPG keys for pkgsrc infrastructure
png-1.6.23 Library for manipulating PNG images
postfix-3.0.2nb4 Postfix SMTP server and tools
python27-2.7.11nb2 Interpreted, interactive, object-oriented programming language
readline-6.3nb3 GNU library that can recall and edit previous input
rsyslog-8.19.0 The enhanced syslogd for Unix
smtools-20160523 Joyent tools relevant to SmartOS and SmartMachines
sqlite3-3.13.0 SQL Database Engine in a C Library
sudo-1.8.15nb1 Allow others to run commands as root
tcl-8.6.5nb1 Tool Command Language, a dynamic language
tcp_wrappers-7.6.4 Monitor and filter incoming requests for network services
tk-8.6.5 Graphical toolkit for TCL
tmux-2.2 BSD-licensed terminal multiplexer (GNU Screen alternative)
wget-1.18 Retrieve files from the 'net via HTTP and FTP
xz-5.2.2 XZ utilities
zlib-1.2.8nb3 General purpose data compression library
zoneinit-1.6.9 Joyent Instance initialization toolchain
The text was updated successfully, but these errors were encountered: