You are not logged in.

#1 2011-09-05 16:26:34

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 456
Website

libunwind compilation issue

I'm in the process of creating a PKGBUILD for GPSShogi, which depends on google-perftools (and therefore libunwind).  However, after trying to install libunwind (both version 0.99 and 1.0) from the AUR, I get the following error:

/usr/include/bits/setjmp2.h:26:13: error: ‘longjmp’ aliased to undefined symbol ‘_longjmp’
make[2]: *** [setjmp/longjmp.lo] Error 1
make[2]: Leaving directory `/tmp/packerbuild-1000/libunwind/libunwind/src/libunwind-1.0/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/tmp/packerbuild-1000/libunwind/libunwind/src/libunwind-1.0/src'
make: *** [all-recursive] Error 1
==> ERROR: A failure occurred in build().

And the file in question (/usr/include/bits/setjmp2.h):

/* Checking macros for setjmp functions.
   Copyright (C) 2009 Free Software Foundation, Inc.
   This file is part of the GNU C Library.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   The GNU C Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with the GNU C Library; if not, write to the Free
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
   02111-1307 USA.  */

#ifndef _SETJMP_H
# error "Never include <bits/setjmp2.h> directly; use <setjmp.h> instead."
#endif

/* Variant of the longjmp functions which perform some sanity checking.  */
#ifdef __REDIRECT_NTH
extern void __REDIRECT_NTH (longjmp,
                            (struct __jmp_buf_tag __env[1], int __val),
                            __longjmp_chk) __attribute__ ((__noreturn__));
extern void __REDIRECT_NTH (_longjmp,
                            (struct __jmp_buf_tag __env[1], int __val),
                            __longjmp_chk) __attribute__ ((__noreturn__));
extern void __REDIRECT_NTH (siglongjmp,
                            (struct __jmp_buf_tag __env[1], int __val),
                            __longjmp_chk) __attribute__ ((__noreturn__));
#else
extern void __longjmp_chk (struct __jmp_buf_tag __env[1], int __val),
     __THROW __attribute__ ((__noreturn__));
# define longjmp __longjmp_chk
# define _longjmp __longjmp_chk
# define siglongjmp __longjmp_chk
#endif

Does anyone have a suggestion on how to fix this error?


Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds

Offline

#2 2011-09-12 21:51:57

josephg
Member
From: Brazil
Registered: 2009-09-28
Posts: 106

Re: libunwind compilation issue

Looks like you are not the only one with this problem. I googled a bit and found a lot of complaints, but with glibc 2.11. Archlinux currently have glibc 2.14, but problem still happens.

Do you need "libunwind-setjmp" or you can avoid its compilation, using only libunwind? Fedora seems to have disabled the setjmp compilation, as you can read in here: https://bugzilla.redhat.com/show_bug.cgi?id=714686

This link also have a link to a patch that disables setjmp. Maybe you could test this patch or even recreate it, applying in the PKGBUILD.

Offline

#3 2011-09-13 00:30:04

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 456
Website

Re: libunwind compilation issue

The patch supplied by Fedora doesn't work without adjustments.  I just created a new patch for libunwind on arch, but compilation still fails at the same point as before.

Thanks for the suggestion though, I'll have another look tomorrow and see if there is any more info on the fedora page.


Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds

Offline

Board footer

Powered by FluxBB