Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1365179 - Failure when building external module when directory name contains whitespace
Summary: Failure when building external module when directory name contains whitespace
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 24
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2016-08-08 14:37 UTC by Joe M
Modified: 2016-08-08 17:25 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2016-08-08 17:25:19 UTC

Attachments (Terms of Use)

Description Joe M 2016-08-08 14:37:39 UTC
Description of problem:  When building a external module, build fails if the path of the sourcetree of the module contains embedded spaces

Version-Release number of selected component (if applicable):4.6.5-300.fc24

How reproducible:

Steps to Reproduce:
1. Attempt to build an external kernel module with an embedded space in its pathname. For example  (a driver module for a rtl3192eu based wifi dongle)
"/home/me/Documents/Startek_USB300WN_wifi/Linux/linux 4.4.x"

2. execute it makefile

Actual results: Build Fails
Message displayed is "Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler"

Expected results: Build should complete

Additional info:
Changing the name of the directory to "/home/me/Documents/Startek_USB300WN_wifi/Linux/linux_4.4.x"  (ie getting rid of the embedded whitespace) resolves the issue.
I have done some investigation, and problem appears to be way that directoryname is parsed in Makefile located in /usr/src/kernels/4.6.5-300.fc24.x86_64
The pathname is passed from the modules Makefile to the kernel Makefile via the commandline parameter M=<pathnname to the module to be built>
Looks like this path is then further handed down (in kernel source tree) to scripts/

I have not been able to devise a fix. 

Workaround is simple --- get rid of embedded space in directoryname (Whitespace in a directoryname is probably not good practice anyway --- but that's the way the module code came packaged, so its a trap for the unknowing).

Comment 1 Laura Abbott 2016-08-08 17:25:19 UTC
This isn't really something that can be fixed, as you've discovered. Your workaround is the correct solution, fix up your path to not have spaces. It's just one more step in making 3rd party modules compile unfortunately.

Note You need to log in before you can comment on or make changes to this bug.