p11-kit 0.18.0 make check error #18979

Closed
manphiz opened this Issue Apr 5, 2013 · 84 comments

Comments

Projects
None yet
Contributor

manphiz commented Apr 5, 2013

gms8994 commented Apr 5, 2013

Same issue; on Mountain Lion

Yulli commented Apr 5, 2013

I can confirm this issue. My brew doctor is clean.

Contributor

jacknagel commented Apr 5, 2013

Hmm, this is exactly the issue that the patch is supposed to address (it works here).

zzwzj commented Apr 5, 2013

What methods are tried, or not

Contributor

andrew-d commented Apr 5, 2013

I can also confirm. OS X 10.7.5 here.

edwardw commented Apr 5, 2013

Same issue here; Mountain Lion 10.8.3. And homebrew provides the link to this ticket after installation failure, which is very handy.

alopezt commented Apr 5, 2013

Confirmed. brew doctor is clean. OS X 1.8.3

Contributor

jacknagel commented Apr 5, 2013

Note that the original upstream ticket for this issue is: https://bugs.freedesktop.org/show_bug.cgi?id=57714

The author of this software doesn't have access to OS X, so getting a real fix will require some help from others.

Contributor

manphiz commented Apr 5, 2013

Commenting out "free" call in p11_library_uninit(void) silenced the error, but could lead to memory leak. Pull request: mxcl#18983.

Same problem, but the fix is working like a charm, thanks! (10.7.5, with brew doctor clean)

brew unlink p11-kit
brew install https://raw.github.com/manphiz/homebrew/14df14427b0ce76334f7dbab6d041ab6412d11d4/Library/Formula/p11-kit.rb

(It's crazy efficient this homebrew with the community!)

luizeof commented Apr 5, 2013

same problem .. but @pierreozoux tip work here ! thanks.

a5sk4s commented Apr 5, 2013

Fails on OS X 1.6.8 too - success with @pierreozoux's tip

@pierreozoux 's tip worked for me, but only after I executed:
rm /Library/Caches/Homebrew/p11-kit-0.18.0.tar.gz
rm -rf /usr/local/Cellar/p11-kit/0.18.0

Then tried the "brew install ... " command

Same as above brew doctor is clean. @pierreozoux's tip worked for me.

pjv commented Apr 5, 2013

10.8.3: i had to do @arobinson first then @pierreozoux

thanks!

mrded commented Apr 6, 2013

@pierreozoux thank you! (10.8.3)

eklein commented Apr 6, 2013

i didn't have any luck with any of this on 10.8.3.. anyone on 10.8.3 have any other suggestions?

Contributor

Sharpie commented Apr 6, 2013

Note that the original upstream ticket for this issue is: https://bugs.freedesktop.org/show_bug.cgi?id=57714

This looks different---that issue deals with incorrect loading of shared libraries. The backtraces for this bug report show that the library is attempting to free memory which has not been allocated.

Contributor

durka commented Apr 6, 2013

No luck with @pierreozoux's patch here on 10.8.2. brew doctor is clean except for the Mono.framework warning (and p11-kit as a missing dependency of course).

Edit: Actually, the patch works, but there is still another test failure:

bash-4.2$ ./test-init
p11-kit: p11-kit initialization called recursively
Segmentation fault: 11

Here is a backtrace (how the heck can I get it to compile with -g for make check?):

(gdb) bt
#0  0x0000000100007fd6 in next_entry ()
#1  0x0000000100007f9a in p11_dict_next ()
#2  0x000000010000313c in free_modules_when_no_refs_unlocked ()
#3  0x00000001000030ff in finalize_module_unlocked_reentrant ()
#4  0x000000010000371b in p11_kit_finalize_module ()
#5  0x0000000100001ae3 in finalization_thread ()
#6  0x00007fff9276a742 in _pthread_start ()
#7  0x00007fff92757181 in thread_start ()

The test only fails about 50% of the time.

eklein commented Apr 6, 2013

After upgrading xcode to the newest version, I was able to install cleanly with the patch applied on 10.8.3.

@eklein Xcode 4.6.1? There was update to the command line tools and, after that, I tried to clean install p11-kit again, but it did not work. Also on 10.8.3.

Contributor

jacknagel commented Apr 6, 2013

Leaving this open until both bugs are resolved upstream, but I've pulled #18983 in the meantime.

eklein commented Apr 6, 2013

@garrettoreilly yep, 4.6.1. I upgraded to 4.6.1, then did what @arobinson suggested, and finally installed using the method @pierreozoux mentioned.

@pierreozoux 's tip worked here, 10.7.5. thanks!

Member

L2G commented Apr 8, 2013

Neither the stock p11-kit nor @pierreozoux's patch work for me. (Mac OS X 10.7.5, brew doctor reports all clear)

Olical commented Apr 8, 2013

I'm on 10.8.3, xcode freshly updated, and neither @pierreozoux's patch or the default work for me. It looks like it compiles fine though. brew doctor also thinks everything is fine. I also tried what @arobinson suggested.

Contributor

manphiz commented Apr 8, 2013

On Apr 8, 2013 2:14 AM, "Oliver Caldwell" notifications@github.com wrote:

I'm on 10.8.3, xcode freshly updated, and neither @pierreozoux's patch or
the default work for me. It looks like it compiles fine though. brew doctor
also thinks everything is fine. I also tried what @arobinson suggested.

The patch has already been incorporated in p11-kit formula and no
workaround is needed anymore.


Reply to this email directly or view it on GitHub.

Yes, just to clarify, I didn't do anything, just wrote the method to apply @manphiz's patch! So all the thanks and mine has to go to @manphiz !

ld commented Apr 9, 2013

Neither works for me, 10.7.5 @L2G

Contributor

jacknagel commented Apr 9, 2013

Rather than have people continue to comment here, adding any potential useful details to https://bugs.freedesktop.org/show_bug.cgi?id=57714 will do a lot more to help get this resolved. Thanks!

I don't know if this is meaningful to the upstream project, but updating to the latest command-line tools (via XCode's Preferences menu) resolved the problem without any additional hackery. It might be worth adding a check to the "doctor" command, but that's about as far as my brew-fu goes :-)

Contributor

lotia commented Apr 11, 2013

I've posted output from install -v (in my case upgrade was the actuall command called) as a comment at https://bugs.freedesktop.org/show_bug.cgi?id=57714.

Contributor

metabr commented Apr 12, 2013

It looks like test fails only when package built with clang.

Manual build ("./configure && make") uses llvm-gcc and builds package successfully. Since homebrew use clang by default,

brew install p11-kit

will fail.

Following method works for me:

brew install p11-kit --use-gcc

OS X 10.8.3, XCode 4.6.1 with latest command line tools.

Updated Xcode and followed @pierreozoux's suggestion and p11-kit installed without a problem.

smmckay commented Apr 15, 2013

Reinstalling pkg-config and libtasn1 (dependencies) fixed this for me.

Contributor

sashka commented Apr 16, 2013

brew install p11-kit --use-gcc worked for me.

Contributor

durka commented Apr 16, 2013

Now I was able to install after reinstalling the deps and passing --use-gcc.

Contributor

moreindirection commented Apr 17, 2013

Updating to latest Xcode and using -use-gcc did it for me.

Contributor

lotia commented Apr 17, 2013

People for whom the formula is working with the --use-gcc flag, can you please share what version of XCode you're running?
Thanks

Contributor

moreindirection commented Apr 17, 2013

I have 4.6.2

Contributor

manphiz commented Apr 18, 2013

What problems are you guys seeing? Currently I'm not seeing problem when building with Clang locally.

Contributor

kadrach commented Apr 18, 2013

@joedursun merged @pierreozoux suggestion a few days ago, which sort-of fixes the problem. It should build fine at the moment, using clang.

a5sk4s commented Apr 18, 2013

it builds fine on OS X 1.6.8:

$ brew install p11-kit
==> Downloading http://p11-glue.freedesktop.org/releases/p11-kit-0.18.0.tar.gz
######################################################################## 100.0%
==> Patching
patching file p11-kit/tests/test-init.c
patching file common/library.c
==> ./configure --prefix=/usr/local/Cellar/p11-kit/0.18.0 --without-trust-paths
==> make
==> make check
==> make install
/usr/local/Cellar/p11-kit/0.18.0: 52 files, 1.0M, built in 28 seconds
``

10.7.5. Latest Xcode and command line tools.

bash-3.2$ brew doctor
Your system is ready to brew.

bash-3.2$ rm /Library/Caches/Homebrew/p11-kit-0.18.0.tar.gz
bash-3.2$ rm -rf /usr/local/Cellar/p11-kit/0.18.0
bash-3.2$ brew install p11-kit --use-gcc
==> Downloading http://p11-glue.freedesktop.org/releases/p11-kit-0.18.0.tar.gz
######################################################################## 100.0%
==> Patching
patching file p11-kit/tests/test-init.c
patching file common/library.c
==> ./configure --prefix=/usr/local/Cellar/p11-kit/0.18.0 --without-trust-paths
==> make

==> make check

make[3]: *** [check-TESTS] Error 1
make[2]: *** [check-am] Error 2
make[1]: *** [check-recursive] Error 1
make: *** [check-recursive] Error 1

READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting

These open issues may also help:
mxcl#18979

Contributor

durka commented Apr 18, 2013

That looks like the same error I was getting before, @dirk94018. Like I said a few comments up, when I investigated which test was failing, it seemed to be an inconsistent failure (~50% of the time). That's why I'm a little nervous about all the people (including me) getting p11-kit to install with seemingly random combinations of brew update, XCode update, apply this patch, apply that patch, delete that file, use GCC... because it could be luck of the draw.

Contributor

adamv commented Apr 18, 2013

@dirk94018 Please gist ( https://gist.github.com/ ) the result of brew install -v p11-kit. Note that modern versions of Xcode do not come with plain GCC, just LLVM-GCC and Clang, so passing in --gcc has random behavior.

Having the same problems. Here's a gist of brew install -v p11-kit.

--with-gcc did not work for my environment

Contributor

adamv commented Apr 18, 2013

@jacknagel should we temp. disable running the tests?

Contributor

jacknagel commented Apr 18, 2013

I guess

Contributor

manphiz commented Apr 18, 2013

@adamv The problem lies in common/library.c, so if there is a problem it is related to the whole library, not just the test cases. Could be an LLVM bug, as make check works on Linux with GCC. Will try GCC on Mac after work.

@pierreozoux fix worked for me as well 10.8.3

And yes test 1 of 7 is failing for me like everyone else.

Contributor

durka commented Apr 18, 2013

@adamv wouldn't it make more sense to revert to an earlier version rather than ignore a failing test?

Contributor

adamv commented Apr 19, 2013

@durka probably

kikin81 commented Apr 19, 2013

has there been a fix for this issue? I am having the same error.

Contributor

h12o commented Apr 19, 2013

I once have the same failure with the d2e023f changeset. But when I tried again it is succeeded.

Contributor

filib commented Apr 19, 2013

Same as @h12o. Failed on update and then worked second time round.

k0g00t commented Apr 19, 2013

Same problem, I tried 3 times. Working after
rm -rf /Library/Caches/Homebrew/p11-kit-0.18.*

Contributor

trevor commented Apr 19, 2013

confirmed @k0g00t - clearing the cache resulted in successful install.

Xcode 4.5.2

went like this for me:

% brew install p11-kit
Warning: Your Xcode (4.5.2) is outdated
Please install Xcode 4.6.2.
==> Downloading http://p11-glue.freedesktop.org/releases/p11-kit-0.18.1.tar.gz
######################################################################## 100.0%
==> Patching
patching file configure.ac
patching file configure
Hunk #1 succeeded at 17201 with fuzz 1.
patching file common/library.c
==> ./configure --prefix=/usr/local/Cellar/p11-kit/0.18.1 --without-trust-paths
==> make
==> make check
============================================================================
make[3]: *** [check-TESTS] Error 1
make[2]: *** [check-am] Error 2
make[1]: *** [check-recursive] Error 1
make: *** [check-recursive] Error 1

READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting

These open issues may also help:
    https://github.com/mxcl/homebrew/issues/18979

% rm -rf /Library/Caches/Homebrew/Formula/*

% brew install p11-kit
Warning: Your Xcode (4.5.2) is outdated
Please install Xcode 4.6.2.
==> Downloading http://p11-glue.freedesktop.org/releases/p11-kit-0.18.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/p11-kit-0.18.1.tar.gz
==> Patching
patching file configure.ac
patching file configure
Hunk #1 succeeded at 17201 with fuzz 1.
patching file common/library.c
==> ./configure --prefix=/usr/local/Cellar/p11-kit/0.18.1 --without-trust-paths
==> make
==> make check
==> make install
  /usr/local/Cellar/p11-kit/0.18.1: 53 files, 1.0M, built in 47 seconds

--with-gcc worked for me. XCode 4.6.2, OS X 10.8.3.

exchgr commented Apr 22, 2013

Riffing off @trevor's post, I found you additionally need to run rm -rf ~/Library/Caches/Homebrew/Formula/p11-kit.*. This works with p11-kit 0.18.1 and Xcode 4.6.2 on OS X 10.8.3.

Contributor

trevor commented Apr 22, 2013

I'd be interested in knowing why this fixes the problem. My first thought was that p11-kit had pushed a "silent" fix, but that wouldn't have made it past the sha256 hash.

Strangely enough, removing the cached p11-kit.tars and installing --with-gcc succeeded here as well (git log in /usr/local states d6a2964eabd34d2ba8e62b5e19dff5ffea24e527, OSX 10.8.3, xcode462_cltools_10_86938259a)

None of the above has worked for me so far. Still fails here:

p11-kit: p11-kit initialization called recursively
/bin/sh: line 1: 33525 Segmentation fault: 11 ${dir}$tst
FAIL: test-init

OS X 10.7.5, latest Xcode and command line utile.

chris4d commented Apr 23, 2013

Tried permutations of every suggested fix without success; about the eighth try, it worked. confusing. OSX 10.8.3, Xcode 4.6.2 and updated command-line tools. clear the cache and keep trying, I guess.

apnsngr commented Apr 23, 2013

Mine worked after using @exchgr's tip! Similar setup Xcode 4.6.2 and OS X 10.8.3. Thanks!

Contributor

candlerb commented Apr 23, 2013

No joy here. OSX 10.7.5, I've upgraded to Xcode 4.6.2 and CLI tools.

Brians-MacBook-Air:~ $ rm ~/Library/Caches/Homebrew/p11-kit*
Brians-MacBook-Air:~ $ rm ~/Library/Caches/Homebrew/Formula/p11-kit*
Brians-MacBook-Air:~ $ brew install p11-kit
==> Downloading http://p11-glue.freedesktop.org/releases/p11-kit-0.18.1.tar.gz
######################################################################## 100.0%
==> Patching
patching file configure.ac
patching file configure
Hunk #1 succeeded at 17201 with fuzz 1.
patching file common/library.c
==> ./configure --prefix=/usr/local/Cellar/p11-kit/0.18.1 --without-trust-paths
==> make
==> make check
============================================================================
make[3]: *** [check-TESTS] Error 1
make[2]: *** [check-am] Error 2
make[1]: *** [check-recursive] Error 1
make: *** [check-recursive] Error 1

READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting

These open issues may also help:
    https://github.com/mxcl/homebrew/issues/18979

Same with --use-gcc.

The one test which fails, as shown by brew install -v p11-kit, is:

p11-kit: p11-kit initialization called recursively
/bin/sh: line 1: 81884 Segmentation fault: 11  ${dir}$tst
FAIL: test-init
Contributor

trevor commented Apr 23, 2013

@candlerb

try

% mv /Library/Caches/Homebrew /tmp/hb1
% mv ~/Library/Caches/Homebrew /tmp/hb2
Contributor

candlerb commented Apr 23, 2013

@trevor: no difference.

Brians-MacBook-Air:~ $ ls /Library/Caches/Homebrew
ls: /Library/Caches/Homebrew: No such file or directory
Brians-MacBook-Air:~ $ mv ~/Library/Caches/Homebrew /tmp/hb2
Brians-MacBook-Air:~ $ brew install p11-kit
==> Downloading http://p11-glue.freedesktop.org/releases/p11-kit-0.18.1.tar.gz
######################################################################## 100.0%
==> Patching
patching file configure.ac
patching file configure
Hunk #1 succeeded at 17201 with fuzz 1.
patching file common/library.c
==> ./configure --prefix=/usr/local/Cellar/p11-kit/0.18.1 --without-trust-paths
==> make
==> make check
============================================================================
make[3]: *** [check-TESTS] Error 1
make[2]: *** [check-am] Error 2
make[1]: *** [check-recursive] Error 1
make: *** [check-recursive] Error 1

READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting

These open issues may also help:
    https://github.com/mxcl/homebrew/issues/18979
Contributor

candlerb commented Apr 23, 2013

inkdeep commented Apr 23, 2013

I got p11-kit to install by running brew uninstall p11-kit repeatedly until I got Error: No such keg: /usr/local/Cellar/p11-kit and then trying the install again.

OT: I'm guessing brew uninstall only acts on the latest version? Was unexpected behavior. I'll have to check out the homebrew source to see if 'uninstall' acts as a rollback/downgrade.

@inkeedp worked for me. But only after failing once. Bizarre!

Worked for me after cleaning up the caches

nagae commented Apr 24, 2013

The followings worked for me:

1.remove the latest version (0.14 for me) of p11-kit:

$ brew remove p11-kit
Uninstalling /usr/local/Cellar/p11-kit/0.14...

2. (re-)install p11-kit. This may fail with error:

$ brew istall p11-kit
==> Downloading http://p11-glue.freedesktop.org/releases/p11-kit-0.18.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/p11-kit-0.18.1.tar.gz
==> Patching
patching file configure.ac
patching file configure
Hunk #1 succeeded at 17201 with fuzz 1.
patching file common/library.c
==> ./configure --prefix=/usr/local/Cellar/p11-kit/0.18.1 --without-trust-paths
==> make
==> make check
============================================================================
make[3]: *** [check-TESTS] Error 1
make[2]: *** [check-am] Error 2
make[1]: *** [check-recursive] Error 1
make: *** [check-recursive] Error 1

READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting

These open issues may also help:
    https://github.com/mxcl/homebrew/issues/18979

3.try brew install p11-kit again. It might succeed:

$ brew install p11-kit
==> Downloading http://p11-glue.freedesktop.org/releases/p11-kit-0.18.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/p11-kit-0.18.1.tar.gz
==> Patching
patching file configure.ac
patching file configure
Hunk #1 succeeded at 17201 with fuzz 1.
patching file common/library.c
==> ./configure --prefix=/usr/local/Cellar/p11-kit/0.18.1 --without-trust-paths
==> make
==> make check
==> make install
/usr/local/Cellar/p11-kit/0.18.1: 53 files, 1.0M, built in 25 seconds
Contributor

candlerb commented Apr 24, 2013

Thanks everyone, but still no joy here. It fails consistently. I tried building 3 times after uninstalling the old version, they fail the same way.

Brians-MacBook-Air:~ $ brew uninstall p11-kit
Error: p11-kit has multiple installed versions
Use `brew remove --force p11-kit` to remove all versions.
Brians-MacBook-Air:~ $ brew uninstall --force p11-kit
Uninstalling p11-kit...
Brians-MacBook-Air:~ $ brew install p11-kit
==> Downloading http://p11-glue.freedesktop.org/releases/p11-kit-0.18.1.tar.gz
Already downloaded: /Users/brian/Library/Caches/Homebrew/p11-kit-0.18.1.tar.gz
==> Patching
patching file configure.ac
patching file configure
Hunk #1 succeeded at 17201 with fuzz 1.
patching file common/library.c
==> ./configure --prefix=/usr/local/Cellar/p11-kit/0.18.1 --without-trust-paths
==> make
==> make check
============================================================================
make[3]: *** [check-TESTS] Error 1
make[2]: *** [check-am] Error 2
make[1]: *** [check-recursive] Error 1
make: *** [check-recursive] Error 1

READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting

These open issues may also help:
    https://github.com/mxcl/homebrew/pull/19391
    https://github.com/mxcl/homebrew/issues/18979
Brians-MacBook-Air:~ $ brew install p11-kit
==> Downloading http://p11-glue.freedesktop.org/releases/p11-kit-0.18.1.tar.gz
Already downloaded: /Users/brian/Library/Caches/Homebrew/p11-kit-0.18.1.tar.gz
... etc

I haven't yet tried applying #19391.

@nagae : It doesnt seem to work just by simply uninstalling and reinstalling a second time....
I had to do the following sequence

  • brew rm p11-kit
  • brew cleanup
  • brew install p11-kit

I did not need the second install...

Contributor

candlerb commented Apr 24, 2013

#19391 worked!!

$ cd /usr/local/Library/Formula
$ mv p11-kit.rb p11-kit.rb.orig
$ wget https://raw.github.com/manphiz/homebrew/838c136f352f6af87d35bade64569f1906d9f093/Library/Formula/p11-kit.rb
$ brew install p11-kit
==> Downloading http://p11-glue.freedesktop.org/releases/p11-kit-0.18.1.tar.gz
Already downloaded: /Users/brian/Library/Caches/Homebrew/p11-kit-0.18.1.tar.gz
==> Patching
patching file configure.ac
patching file configure
Hunk #1 succeeded at 17201 with fuzz 1.
patching file common/library.c
==> ./configure --prefix=/usr/local/Cellar/p11-kit/0.18.1 --without-trust-paths
==> make
==> make check
==> make install
?  /usr/local/Cellar/p11-kit/0.18.1: 53 files, 1.0M, built in 29 seconds
Contributor

leedm777 commented Apr 24, 2013

#19391 worked for me, too.

[dlee@dlee-mac ~]$ cd /usr/local/
[dlee@dlee-mac local (master)]$ git remote add manphiz --no-tags git://github.com/manphiz/homebrew.git
[dlee@dlee-mac local (master)]$ git fetch manphiz
remote: Counting objects: 27, done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 15 (delta 12), reused 4 (delta 1)
Unpacking objects: 100% (15/15), done.
From git://github.com/manphiz/homebrew
 * [new branch]      gfortran   -> manphiz/gfortran
 * [new branch]      icu4c      -> manphiz/icu4c
 * [new branch]      master     -> manphiz/master
 * [new branch]      p11-kit    -> manphiz/p11-kit
[dlee@dlee-mac local (master)]$ git merge 838c136f352f6af87d35bade64569f1906d9f093
Merge made by the 'recursive' strategy.
 Library/Formula/p11-kit.rb | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
[dlee@dlee-mac local (master)]$ brew install p11-kit
==> Downloading http://p11-glue.freedesktop.org/releases/p11-kit-0.18.1.tar.gz
Already downloaded: /Users/dlee/Library/Caches/Homebrew/p11-kit-0.18.1.tar.gz
==> Patching
patching file configure.ac
patching file configure
Hunk #1 succeeded at 17201 with fuzz 1.
patching file common/library.c
==> ./configure --prefix=/usr/local/Cellar/p11-kit/0.18.1 --without-trust-paths
==> make
==> make check
==> make install
/usr/local/Cellar/p11-kit/0.18.1: 53 files, 1.0M, built in 46 seconds
Contributor

manphiz commented Apr 25, 2013

mxcl#19391 has been merged. Everyone please update your homebrew then retry installing p11-kit, and report back in case of any further issues.

Contributor

durka commented Apr 25, 2013

@manphiz wfm.

@manphiz Installed successfully!

Edit: 10.8.3

jacknagel closed this Apr 26, 2013

xu-cheng locked and limited conversation to collaborators Feb 16, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.