Won't compile if build is remote called (wrong path setting in ubuntu/omnibook/Makefile)

Bug #505420 reported by Michał Kozal on 2010-01-10
56
This bug affects 13 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
Andy Whitcroft
Lucid
Undecided
Tim Gardner

Bug Description

Binary package hint: linux-source-2.6.32

In ubuntu/omnibook/Makefile Line 161:
EXTRA_LDFLAGS += $(PWD)/ubuntu/omnibook/sections.lds

But if we call kernel build remotely, PWD is "" which gives us an error:

ld: /ubuntu/omnibook/sections.lds: No such file: No such file or directory

because it's set only when directly called.
Solution is to move line where PWD is set (PWD = $(shell pwd)) out of "ifeq ($(KERNELRELEASE),)"
so it's set with both direct and remote calls.

CVE References

Michał Kozal (panaut0lordv) wrote :

First attachment is wrong file, please delete.

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Andy Whitcroft (apw) on 2010-01-13
tags: added: lucid
Andy Whitcroft (apw) on 2010-01-18
Changed in linux (Ubuntu):
assignee: nobody → Andy Whitcroft (apw)
status: Triaged → In Progress
Andy Whitcroft (apw) wrote :

@panaut0lordv -- could you explain your use case here please? ie how you are triggering this error. We build the kernel both in tree and out of tree and do not tickle this error. I am not convinced that the change you are suggesting is correct for the general case even if it works. A transcript of the exact command and error would be helpful. Thanks!

Changed in linux (Ubuntu):
status: In Progress → Incomplete
Michał Kozal (panaut0lordv) wrote :

It happens when I'm trying to build this module - it's driver for my "VHS camera to USB" grabber.
svn co https://syntekdriver.svn.sourceforge.net/svnroot/syntekdriver syntekdriver

I've installed linux-source and extracted it. After I run Makefile.standalone it gives me "ld: /ubuntu/omnibook/sections.lds: No such file: No such file or directory"

Devin Hewage (devinsean) wrote :

For me, when I try to compile the kernel, it goes fine for a bit, then I get the following error.

ld: /ubuntu/omnibook/sections.lds: No such file: No such file or directory
make[2]: *** [ubuntu/omnibook/omnibook] Error 1
make[1]: *** [ubuntu/omnibook] Error 2
make: *** [ubuntu] Error

SleepZ (davidrak) wrote :

I'm getting the same error when I compile the kernel using make-kpkg. Fix seems to have worked. Thanks!

Same issue compiling RTL81192E linux drivers. Moving the PWD set indeed works.

Changed in linux (Ubuntu):
status: Incomplete → Triaged
tags: added: kernel-core
tags: added: patch

I was unable to compile the Ubuntu 2.6.32 kernel on a HP Pavillion dv6 without this patch as well. Patch works for me

Thag (bruce-edge) wrote :

Patch works for me too.
Was failing without it.

My .config is attached.

Jonie Dayie (dps12345d) wrote :

Your patch works for me, too. It was not compiling without it. Kernel version 2.6.32. Ubuntu.

Jonie Dayie (dps12345d) wrote :

By the way, thank you VERY MUCH for doing all the leg work to discover the problem and write the patch. I don't know how you figured that out, but it saved me a lot of time.

Fabio Kaminski (fabiokaminski) wrote :

ln -s /usr/src/linux-2.6.35/ubuntu ubuntu

Fabio Kaminski (fabiokaminski) wrote :

ln -s /usr/src/linux-2.6.35/ubuntu /ubuntu .. faster then patch :)

Cadu Souza (cessbronson) wrote :

Thanks to the reporter of the bug/workaround and to Fabio Kaminski for a quick one line solution. Worked fine here too.

Martin Bishop (martin-bishop) wrote :

I'm guessing this is a bash/zsh issue, at least that appeared to be the case for me.

mustali (archebyte) wrote :

Experienced the error while trying to compile the kernel in Maverick
Package: linux-source-2.6.35
  LD [M] ubuntu/omnibook/omnibook.o
ld: cannot find /ubuntu/omnibook/sections.lds: No such file or directory
make[2]: *** [ubuntu/omnibook/omnibook.o] Error 1
make[1]: *** [ubuntu/omnibook] Error 2
make: *** [ubuntu] Error 2

The one line fix in the Makefile fixed it.

  LD arch/x86/built-in.o
  LD [M] ubuntu/omnibook/omnibook.o
  LD ubuntu/rfkill/built-in.o
  CC [M] ubuntu/rfkill/av5100.o

mazkagaz (mazkagaz) wrote :

Same error with linux-source-2.6.38
Same solution.
Moving the line "PWD = $(shell pwd)" just before "ifeq ($(KERNELRELEASE),)" fixed the problem.

Nicholas Janssen (xnicholas) wrote :

uname -a
2.6.32-42-generic-pae #95-Ubuntu SMP Wed Jul 25 16:13:09 UTC 2012 i686 GNU/Linux

same error linux-source-2.6.32

ld: /ubuntu/omnibook/sections.lds: No such file: No such file or directory
make[2]: *** [ubuntu/omnibook/omnibook.o] Error 1
make[1]: *** [ubuntu/omnibook] Error 2
make: *** [ubuntu] Error 2

Same solution.
Moving the line "PWD = $(shell pwd)" just before "ifeq ($(KERNELRELEASE),)" fixed the problem.

bleach toonami

Tim Gardner (timg-tpi) on 2012-10-02
Changed in linux (Ubuntu):
status: Triaged → Invalid
Changed in linux (Ubuntu Lucid):
assignee: nobody → Tim Gardner (timg-tpi)
status: New → In Progress
Tim Gardner (timg-tpi) on 2012-10-12
Changed in linux (Ubuntu Lucid):
status: In Progress → Fix Committed
Luis Henriques (henrix) wrote :

This bug is awaiting verification that the kernel for Lucid in -proposed solves the problem (2.6.32-45.99). Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-lucid' to 'verification-done-lucid'.

If verification is not done by one week from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-lucid
Tim Gardner (timg-tpi) wrote :

Marking verifies as this fix has no bearing on the regular build.

tags: added: verification-done-lucid
removed: verification-needed-lucid

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.

Launchpad Janitor (janitor) wrote :
Download full text (11.7 KiB)

This bug was fixed in the package linux - 2.6.32-45.99

---------------
linux (2.6.32-45.99) lucid-proposed; urgency=low

  [Luis Henriques]

  * Release Tracking Bug
    - LP: #1067331

  [ Tim Gardner ]

  * SAUCE: omnibook: Expose PWD for standalone builds
    - LP: #505420

  [ Upstream Kernel Changes ]

  * Revert "xfs: Fix possible memory corruption in xfs_readlink,
    CVE-2011-4077"
    - LP: #1064480
  * UBUNTU SAUCE: apparmor: fix IRQ stack overflow
    - LP: #1056078
  * net/9p: fix virtio transport to correctly update status on connect
    - LP: #676823
  * 9p: Fix the kernel crash on a failed mount
    - LP: #676823
  * netxen: support for GbE port settings
    - LP: #1064480
  * Fix sparc build with newer tools.
    - LP: #1064480
  * powerpc/pmac: Fix SMP kernels on pre-core99 UP machines
    - LP: #1064480
  * Bluetooth: btusb: fix bInterval for high/super speed isochronous
    endpoints
    - LP: #1064480
  * fix pgd_lock deadlock
    - LP: #1064480
  * futex: Fix uninterruptible loop due to gate_area
    - LP: #1064480
  * time: Improve sanity checking of timekeeping inputs
    - LP: #1064480
  * time: Avoid making adjustments if we haven't accumulated anything
    - LP: #1064480
  * time: Move ktime_t overflow checking into timespec_valid_strict
    - LP: #1064480
  * drm/i915: Attempt to fix watermark setup on 85x (v2)
    - LP: #1064480
  * ioat2: kill pending flag
    - LP: #1064480
  * usb: Fix deadlock in hid_reset when Dell iDRAC is reset
    - LP: #1064480
  * oprofile: use KM_NMI slot for kmap_atomic
    - LP: #1064480
  * tty_audit: fix tty_audit_add_data live lock on audit disabled
    - LP: #1064480
  * bonding: 802.3ad - fix agg_device_up
    - LP: #1064480
  * usbnet: increase URB reference count before usb_unlink_urb
    - LP: #1064480
  * usbnet: don't clear urb->dev in tx_complete
    - LP: #1064480
  * sched: Fix signed unsigned comparison in check_preempt_tick()
    - LP: #1064480
  * x86/PCI: amd: factor out MMCONFIG discovery
    - LP: #1064480
  * PNP: fix "work around Dell 1536/1546 BIOS MMCONFIG bug that breaks USB"
    - LP: #1064480
  * KVM: x86: disallow multiple KVM_CREATE_IRQCHIP
    - LP: #1064480
  * KVM: ia64: fix build due to typo
    - LP: #1064480
  * xfs: Fix possible memory corruption in xfs_readlink
    - LP: #1064480
  * xfs: Fix missing xfs_iunlock() on error recovery path in xfs_readlink()
    - LP: #1064480
  * dl2k: use standard #defines from mii.h.
    - LP: #1064480
  * tcp: Don't change unlocked socket state in tcp_v4_err().
    - LP: #1064480
  * x86: Derandom delay_tsc for 64 bit
    - LP: #1064480
  * ipsec: be careful of non existing mac headers
    - LP: #1064480
  * block, sx8: fix pointer math issue getting fw version
    - LP: #1064480
  * nilfs2: fix NULL pointer dereference in nilfs_load_super_block()
    - LP: #1064480
  * USB: ftdi_sio: fix problem when the manufacture is a NULL string
    - LP: #1064480
  * ntp: Fix integer overflow when setting time
    - LP: #1064480
  * SUNRPC: We must not use list_for_each_entry_safe() in rpc_wake_up()
    - LP: #1064480
  * ext4: check for zero length extent
    - LP: #1064480
  * xfs: Fix oops on IO error during xlog_recover_pr...

Changed in linux (Ubuntu Lucid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers