Build failure with 3.2.0-25.40 - ERROR: "sysfs_create_link_nowarn" [drivers/power/power_supply.ko] undefined!

Bug #1005264 reported by Jason Conti
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Luis Henriques
Precise
Fix Released
Medium
Luis Henriques
Quantal
Fix Released
Medium
Luis Henriques

Bug Description

== Precise SRU Justification ==

Current kernel FTBFS if power_supply is set as a module. This has never
been an issue as its built-in into the kernel. It fails with:

 "sysfs_create_link_nowarn" [drivers/power/power_supply.ko] undefined!"

as this symbol is not exported into modules.

== Fix ==

Upstream commit 93278d151e7bd35ccd0e083d7f2d8123cbaf36f8 fixes the build
failure.

== Impact ==

Impact shouldn't be very high. Only users building the kernel from source
and setting this as a module.

== Test Case ==

Build the kernel, setting CONFIG_POWER_SUPPLY=m in the configuration.

================================================================================

When building 3.2.0-25.40 with make-kpkg I get the following error:

ERROR: "sysfs_create_link_nowarn" [drivers/power/power_supply.ko] undefined!

which I believe is caused by the commits pulled in to fix https://bugs.launchpad.net/ubuntu/+source/linux/+bug/568064
The symbol sysfs_create_link_nowarn is not exported to modules, so the build fails. I'm not really sure why the build in proposed didn't fail. The following commit fixes the issue:

From 93278d151e7bd35ccd0e083d7f2d8123cbaf36f8 Mon Sep 17 00:00:00 2001
From: Anton Vorontsov <email address hidden>
Date: Thu, 5 Jan 2012 19:17:25 +0400
Subject: [PATCH] power_supply: Drop usage of nowarn variant of
 sysfs_create_link()

The function is not exported to modules, plus we do want to catch anyone
who tries to create complex hierarchy (in that case we'd need to change
'powers' symlink to a directory, probably under a different name to not
break ABI).

This patch fixes the following build error:

 ERROR: "sysfs_create_link_nowarn" [drivers/power/power_supply.ko] undefined!

Reported-by: Stephen Rothwell <email address hidden>
Signed-off-by: Anton Vorontsov <email address hidden>
---
 drivers/power/power_supply_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c
index bc82f95..6ad6127 100644
--- a/drivers/power/power_supply_core.c
+++ b/drivers/power/power_supply_core.c
@@ -159,7 +159,7 @@ EXPORT_SYMBOL_GPL(power_supply_get_by_name);

 int power_supply_powers(struct power_supply *psy, struct device *dev)
 {
- return sysfs_create_link_nowarn(&psy->dev->kobj, &dev->kobj, "powers");
+ return sysfs_create_link(&psy->dev->kobj, &dev->kobj, "powers");
 }
 EXPORT_SYMBOL_GPL(power_supply_powers);

--
1.7.9.5

Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1005264

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Jason Conti (jconti) wrote :

Could attach a build log but it doesn't really contain additional information, marking as confirmed.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Luis Henriques (henrix) wrote :

It looks like you're building your kernel with CONFIG_POWER_SUPPLY=m. Since the precise kernel is built with CONFIG_POWER_SUPPLY=y, it doesn't fail.

Changed in linux (Ubuntu):
status: Confirmed → Triaged
Luis Henriques (henrix)
Changed in linux (Ubuntu):
assignee: nobody → Luis Henriques (henrix)
Luis Henriques (henrix)
description: updated
Tim Gardner (timg-tpi)
Changed in linux (Ubuntu Precise):
status: New → Fix Committed
Changed in linux (Ubuntu Quantal):
status: Triaged → Fix Released
Changed in linux (Ubuntu Precise):
assignee: nobody → Luis Henriques (henrix)
Changed in linux (Ubuntu Precise):
importance: Undecided → Medium
Changed in linux (Ubuntu Quantal):
importance: Undecided → Medium
Revision history for this message
Luis Henriques (henrix) wrote :

Buildind precise kernel 3.2.0-26.41 with CONFIG_POWER_SUPPLY=m does not fail anymore. Tagging as verified.

tags: added: verification-done-precise
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (13.2 KiB)

This bug was fixed in the package linux - 3.2.0-26.41

---------------
linux (3.2.0-26.41) precise-proposed; urgency=low

  [Luis Henriques]

  * Release Tracking Bug
    - LP: #1012057

  [ Andy Whitcroft ]

  * [Config] fix up postinst to ensure we know which error is which
    - LP: #1002388
  * [Config] highbank -- commonise filesystems
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise subsystems
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise network protocols
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise input drivers
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise CRYPTO options
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise HID options
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise sensors options
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise EXPORTFS/FHANDLE
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise CONFIG_CRYPTO_LZO
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise ENCRYPTED_KEYS
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise CONFIG_ATALK
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise INET/INET6
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise NLS
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise BLK/CHR
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise PHY settings
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise CRC settings
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise BINFMT settings
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise DM settings
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise RTC_DRV settings
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise KEYBOARD/MOUSE settings
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise USB settings
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise GPIO settings
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise I2C settings
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise numerous subsystem selectors
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise A-C modules missmatches
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise D-F modules missmatches
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise G-I modules missmatches
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise J-L modules missmatches
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise M modules missmatches
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise N-P modules missmatches
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise Q-R modules missmatches
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise S modules missmatches
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise T modules missmatches
    - LP: #1000831, #1010463
  * [Config] highbank -- commonise U-Z modules missmatches
    - LP: #1000831, #1010463

  [ Herton Ronaldo Krzesinski ]

  * SAUCE: fix get_gate_vma call in i386 NX emulation code
    - LP: #1009200

  [ Ike Panhc ]

  * [Config] add...

Changed in linux (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.