Build doesn't find ioctl.h

Hi,

I'm attempting to build on Scientific Linux 7.1. I've made good progress,
but I just hit another error. The build can't find ioctl.h; it exists, just
not in the location the build system is looking for it:

$ ls /usr/include/linux/ioctl.h

/usr/include/linux/ioctl.h

[473/490] Compiling

/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/stdlib/public/Glibc/linux/x86_64/Glibc.o
FAILED: cd
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/stdlib/public/Glibc
&& /home/lanes/cmake-3.4.1-Linux-x86_64.binary_distribution/bin/cmake -E
make_directory
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/stdlib/public/Glibc/linux/x86_64
&& /home/lanes/cmake-3.4.1-Linux-x86_64.binary_distribution/bin/cmake -E
make_directory
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/./lib/swift/linux/x86_64
&& /home/lanes/swift/swift/utils/line-directive
/home/lanes/swift/swift/stdlib/public/Glibc/Glibc.swift --
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/./bin/swiftc
-c -sdk / -target x86_64-unknown-linux-gnu -Onone -g -D
INTERNAL_CHECKS_ENABLED -I
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/./lib/swift/linux/x86_64
-module-cache-path
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/./clang-module-cache
-no-link-objc-runtime -autolink-force-load -module-link-name swiftGlibc
-force-single-frontend-invocation -parse-as-library -emit-module
-emit-module-path
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/./lib/swift/linux/x86_64/Glibc.swiftmodule
-o
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/stdlib/public/Glibc/linux/x86_64/Glibc.o
/home/lanes/swift/swift/stdlib/public/Glibc/Glibc.swift
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/lib/swift/glibc/module.map:187:14:
error: header '/usr/include/x86_64-linux-gnu/sys/ioctl.h' not found
      header "/usr/include/x86_64-linux-gnu/sys/ioctl.h"
             ^
/home/lanes/swift/swift/stdlib/public/Glibc/Glibc.swift:13:19: error:
could not build Objective-C module 'SwiftGlibc'
@_exported import SwiftGlibc // Clang module
                  ^
[473/490] Compiling
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/stdlib/private/SwiftPrivate/linux/x86_64/SwiftPrivate.o
ninja: build stopped: subcommand failed.
./swift/utils/build-script: command terminated with a non-zero exit status
1, aborting

I'm assuming there should be a pretty trivial fix for this. Any suggestions
would be greatly appreciated.

Thanks,
Lane

I’d imagine you would have to look into Pull Request #282
<https://github.com/apple/swift/pull/282&gt; and stdlib/public/Glibc/
module.map.in.
Right now they’re making it look in /usr/include/sys/ rather than
/usr/include/x86_64-linux-gnu/sys/.

···

On Wed, Dec 9, 2015 at 12:04 AM, Lane Schwartz via swift-users < swift-users@swift.org> wrote:

Hi,

I'm attempting to build on Scientific Linux 7.1. I've made good progress,
but I just hit another error. The build can't find ioctl.h; it exists, just
not in the location the build system is looking for it:

$ ls /usr/include/linux/ioctl.h

/usr/include/linux/ioctl.h

[473/490] Compiling

/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/stdlib/public/Glibc/linux/x86_64/Glibc.o
FAILED: cd
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/stdlib/public/Glibc
&& /home/lanes/cmake-3.4.1-Linux-x86_64.binary_distribution/bin/cmake -E
make_directory
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/stdlib/public/Glibc/linux/x86_64
&& /home/lanes/cmake-3.4.1-Linux-x86_64.binary_distribution/bin/cmake -E
make_directory
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/./lib/swift/linux/x86_64
&& /home/lanes/swift/swift/utils/line-directive
/home/lanes/swift/swift/stdlib/public/Glibc/Glibc.swift --
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/./bin/swiftc
-c -sdk / -target x86_64-unknown-linux-gnu -Onone -g -D
INTERNAL_CHECKS_ENABLED -I
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/./lib/swift/linux/x86_64
-module-cache-path
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/./clang-module-cache
-no-link-objc-runtime -autolink-force-load -module-link-name swiftGlibc
-force-single-frontend-invocation -parse-as-library -emit-module
-emit-module-path
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/./lib/swift/linux/x86_64/Glibc.swiftmodule
-o
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/stdlib/public/Glibc/linux/x86_64/Glibc.o
/home/lanes/swift/swift/stdlib/public/Glibc/Glibc.swift
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/lib/swift/glibc/module.map:187:14:
error: header '/usr/include/x86_64-linux-gnu/sys/ioctl.h' not found
      header "/usr/include/x86_64-linux-gnu/sys/ioctl.h"
             ^
/home/lanes/swift/swift/stdlib/public/Glibc/Glibc.swift:13:19: error:
could not build Objective-C module 'SwiftGlibc'
@_exported import SwiftGlibc // Clang module
                  ^
[473/490] Compiling
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/stdlib/private/SwiftPrivate/linux/x86_64/SwiftPrivate.o
ninja: build stopped: subcommand failed.
./swift/utils/build-script: command terminated with a non-zero exit
status 1, aborting

I'm assuming there should be a pretty trivial fix for this. Any
suggestions would be greatly appreciated.

Thanks,
Lane

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Thanks. I'd like to test this fix on Scientific Linux 7.1, but I'm having
trouble applying the patch. I replaced stdlib/public/Glibc/CMakeLists.txt
with the version from this commit, and likewise removed
stdlib/public/Glibc/module.map and added the stdlib/public/Glibc/
module.map.in from this commit.

But after doing so, the build doesn't know how to create
stdlib/public/Glibc/module.map:

   - /home/lanes/cmake-3.4.1-Linux-x86_64.binary_distribution/bin/cmake
   --build /home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64 -- all
   swift-stdlib-linux-x86_64 ninja: error:
   '/home/lanes/swift/swift/stdlib/public/Glibc/module.map', needed by
   'lib/swift/glibc', missing and no known rule to make it

How should this fix be applied? Sorry for such a simple question - I'm
fairly new to cmake and don't know ninja at all.

···

On Wed, Dec 9, 2015 at 1:50 AM, Johan Jensen <jj@johanjensen.dk> wrote:

I’d imagine you would have to look into Pull Request #282
<https://github.com/apple/swift/pull/282&gt; and stdlib/public/Glibc/
module.map.in.
Right now they’re making it look in /usr/include/sys/ rather than
/usr/include/x86_64-linux-gnu/sys/.

On Wed, Dec 9, 2015 at 12:04 AM, Lane Schwartz via swift-users < > swift-users@swift.org> wrote:

Hi,

I'm attempting to build on Scientific Linux 7.1. I've made good progress,
but I just hit another error. The build can't find ioctl.h; it exists, just
not in the location the build system is looking for it:

$ ls /usr/include/linux/ioctl.h

/usr/include/linux/ioctl.h

[473/490] Compiling

/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/stdlib/public/Glibc/linux/x86_64/Glibc.o
FAILED: cd
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/stdlib/public/Glibc
&& /home/lanes/cmake-3.4.1-Linux-x86_64.binary_distribution/bin/cmake -E
make_directory
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/stdlib/public/Glibc/linux/x86_64
&& /home/lanes/cmake-3.4.1-Linux-x86_64.binary_distribution/bin/cmake -E
make_directory
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/./lib/swift/linux/x86_64
&& /home/lanes/swift/swift/utils/line-directive
/home/lanes/swift/swift/stdlib/public/Glibc/Glibc.swift --
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/./bin/swiftc
-c -sdk / -target x86_64-unknown-linux-gnu -Onone -g -D
INTERNAL_CHECKS_ENABLED -I
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/./lib/swift/linux/x86_64
-module-cache-path
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/./clang-module-cache
-no-link-objc-runtime -autolink-force-load -module-link-name swiftGlibc
-force-single-frontend-invocation -parse-as-library -emit-module
-emit-module-path
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/./lib/swift/linux/x86_64/Glibc.swiftmodule
-o
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/stdlib/public/Glibc/linux/x86_64/Glibc.o
/home/lanes/swift/swift/stdlib/public/Glibc/Glibc.swift
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/lib/swift/glibc/module.map:187:14:
error: header '/usr/include/x86_64-linux-gnu/sys/ioctl.h' not found
      header "/usr/include/x86_64-linux-gnu/sys/ioctl.h"
             ^
/home/lanes/swift/swift/stdlib/public/Glibc/Glibc.swift:13:19: error:
could not build Objective-C module 'SwiftGlibc'
@_exported import SwiftGlibc // Clang module
                  ^
[473/490] Compiling
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/stdlib/private/SwiftPrivate/linux/x86_64/SwiftPrivate.o
ninja: build stopped: subcommand failed.
./swift/utils/build-script: command terminated with a non-zero exit
status 1, aborting

I'm assuming there should be a pretty trivial fix for this. Any
suggestions would be greatly appreciated.

Thanks,
Lane

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

--
When a place gets crowded enough to require ID's, social collapse is not
far away. It is time to go elsewhere. The best thing about space travel
is that it made it possible to go elsewhere.
                -- R.A. Heinlein, "Time Enough For Love"

Never mind. I didn't have the right remote branch (the one with the fix)
checked out.

···

On Wed, Dec 9, 2015 at 12:56 PM, Lane Schwartz <dowobeha@gmail.com> wrote:

Thanks. I'd like to test this fix on Scientific Linux 7.1, but I'm having
trouble applying the patch. I replaced stdlib/public/Glibc/CMakeLists.txt
with the version from this commit, and likewise removed
stdlib/public/Glibc/module.map and added the stdlib/public/Glibc/
module.map.in from this commit.

But after doing so, the build doesn't know how to create
stdlib/public/Glibc/module.map:

   - /home/lanes/cmake-3.4.1-Linux-x86_64.binary_distribution/bin/cmake
   --build /home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64 -- all
   swift-stdlib-linux-x86_64 ninja: error:
   '/home/lanes/swift/swift/stdlib/public/Glibc/module.map', needed by
   'lib/swift/glibc', missing and no known rule to make it

How should this fix be applied? Sorry for such a simple question - I'm
fairly new to cmake and don't know ninja at all.

On Wed, Dec 9, 2015 at 1:50 AM, Johan Jensen <jj@johanjensen.dk> wrote:

I’d imagine you would have to look into Pull Request #282
<https://github.com/apple/swift/pull/282&gt; and stdlib/public/Glibc/
module.map.in.
Right now they’re making it look in /usr/include/sys/ rather than
/usr/include/x86_64-linux-gnu/sys/.

On Wed, Dec 9, 2015 at 12:04 AM, Lane Schwartz via swift-users < >> swift-users@swift.org> wrote:

Hi,

I'm attempting to build on Scientific Linux 7.1. I've made good
progress, but I just hit another error. The build can't find ioctl.h; it
exists, just not in the location the build system is looking for it:

$ ls /usr/include/linux/ioctl.h

/usr/include/linux/ioctl.h

[473/490] Compiling

/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/stdlib/public/Glibc/linux/x86_64/Glibc.o
FAILED: cd
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/stdlib/public/Glibc
&& /home/lanes/cmake-3.4.1-Linux-x86_64.binary_distribution/bin/cmake -E
make_directory
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/stdlib/public/Glibc/linux/x86_64
&& /home/lanes/cmake-3.4.1-Linux-x86_64.binary_distribution/bin/cmake -E
make_directory
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/./lib/swift/linux/x86_64
&& /home/lanes/swift/swift/utils/line-directive
/home/lanes/swift/swift/stdlib/public/Glibc/Glibc.swift --
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/./bin/swiftc
-c -sdk / -target x86_64-unknown-linux-gnu -Onone -g -D
INTERNAL_CHECKS_ENABLED -I
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/./lib/swift/linux/x86_64
-module-cache-path
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/./clang-module-cache
-no-link-objc-runtime -autolink-force-load -module-link-name swiftGlibc
-force-single-frontend-invocation -parse-as-library -emit-module
-emit-module-path
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/./lib/swift/linux/x86_64/Glibc.swiftmodule
-o
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/stdlib/public/Glibc/linux/x86_64/Glibc.o
/home/lanes/swift/swift/stdlib/public/Glibc/Glibc.swift
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/lib/swift/glibc/module.map:187:14:
error: header '/usr/include/x86_64-linux-gnu/sys/ioctl.h' not found
      header "/usr/include/x86_64-linux-gnu/sys/ioctl.h"
             ^
/home/lanes/swift/swift/stdlib/public/Glibc/Glibc.swift:13:19: error:
could not build Objective-C module 'SwiftGlibc'
@_exported import SwiftGlibc // Clang module
                  ^
[473/490] Compiling
/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/stdlib/private/SwiftPrivate/linux/x86_64/SwiftPrivate.o
ninja: build stopped: subcommand failed.
./swift/utils/build-script: command terminated with a non-zero exit
status 1, aborting

I'm assuming there should be a pretty trivial fix for this. Any
suggestions would be greatly appreciated.

Thanks,
Lane

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

--
When a place gets crowded enough to require ID's, social collapse is not
far away. It is time to go elsewhere. The best thing about space travel
is that it made it possible to go elsewhere.
                -- R.A. Heinlein, "Time Enough For Love"

--
When a place gets crowded enough to require ID's, social collapse is not
far away. It is time to go elsewhere. The best thing about space travel
is that it made it possible to go elsewhere.
                -- R.A. Heinlein, "Time Enough For Love"