Re: [gmime-devel] MacOS-10.6.8+Xcode-3.2.6 (gcc-4.2.1) generates bad code with GMime-2.6.x --enable-cryptography.



Hi SciFi,

Sorry for taking so long to get back to you, I somehow missed it until now.

Unfortunately I haven't actually ever tried building GMime on OSX, so my knowledge is limited.

From the trace output you pasted in your email, it looks like something went wrong in the gpgme initialization. Your best bet is probably to poke them and see if they have any ideas.

Another option would just be to disable S/MIME support in GMime (it's experimental anyway). Unfortunately it doesn't looks like current releases of gmime 2.6.x have a way to do that in the configure script (it auto-enables if it finds gpgme installed), so the easiest way to do it is to probably uninstall gpgme (or you can temporarily disable it by moving the gpgme-config script out of your PATH when configuring gmime).

I'll add a --disable-smime configure switch for future releases.

Hope that helps,

Jeff

On 01/26/2012 03:38 AM, SciFi wrote:

Hi,

When I configure gmime-2.6.x with the --enable-cryptography option,
or merely let it default like that,
we can't use the resulting libs in any project
whether or not those projects use its crypto support.
It's just the plain fact that the gmime libs are not usable in any form
with the gmime crypto option configured as enabled, that I can tell.

I'm needing this option for use with the new Pan master tree at
git.gnome.org, I'm volunteering to be an "OSX test bed" for it.  ;)
(BTW - None of the OSX pkg-mgrs go past gmime-2.4.x,
        and I can't find any OSX'r who is using gmime-2.6.x,
        so I must build this by hand.)

The only way I can get gmime-2.6.x to generate a usable lib
is to specify --disable-cryptography
and make sure other projects disable crypto support as well
(else we'd get related missing symbols etc).

I have freshly built gpgme-1.3.1, libassuan-2.0.3, libgcrypt-1.5.0, etc.,
likewise by hand.

I can show this seems to be strictly related to how gmime is built,
by running its 'make check' phase.
We get similar crashdumps,
with libgmime going into the libgpgme-pthread code.

What I see on console/terminal with crypto enabled:
$ make check
[…]
Testing charset conversion utils: passed
/bin/sh: line 1: 67242 Segmentation fault      ./${test} -v ${testdir}
/bin/sh: line 1: 67264 Segmentation fault      ./${test} -v ${testdir}
/bin/sh: line 1: 67287 Segmentation fault      ./${test} -v ${testdir}
/bin/sh: line 1: 67309 Segmentation fault      ./${test} -v ${testdir}
/bin/sh: line 1: 67330 Segmentation fault      ./${test} -v ${testdir}
/bin/sh: line 1: 67351 Segmentation fault      ./${test} -v ${testdir}
/bin/sh: line 1: 67372 Segmentation fault      ./${test} -v ${testdir}
Results: 1 tests passed; 7 tests failed.
-e Failed tests:
  test-streams
  test-cat
  test-headers
  test-mbox
  test-mime
  test-pgp
  test-pgpmime
make[3]: *** [check-local] Error 255
make[3]: Leaving directory `/Volumes/RamDisk/Safari/gmime-2.6.4/tests'
[…]
$ _

[I have a relevant crashreport-backtrace in a bit…]

If I configure gmime-2.6.x with --disable-cryptography,
then run 'make check', the tests are all okay:
$ make check
[…]
Testing charset conversion utils: passed
Testing Stream tests: passed
Testing GMimeStreamCat: passed
Testing iterating forward and backward: passed
Testing removing all headers: passed
Testing removing individual headers: passed
Testing header synchronization: passed
Testing Mbox parser: no tests performed
Testing addr-spec parser: passed
Testing date parser: passed
Testing rfc2047 encoding/decoding: passed
Testing rfc2184 encoding/decoding: passed
Testing quoted-strings: passed
Testing broken rfc2047 encoding/decoding: passed
Results: 6 tests passed; 0 tests failed.
make[3]: Leaving directory `/Volumes/RamDisk/Safari/gmime-2.6.4/tests'
[…]
$ _


This is one of the 'make check' crashreports when crypto is enabled:

Process:         test-streams [67242]
Path:            /Volumes/RamDisk/Safari/gmime-2.6.4/tests/.libs/test-streams
Identifier:      test-streams
Version:         ??? (???)
Code Type:       X86 (Native)
Parent Process:  sh [67217]

Date/Time:       2012-01-25 19:51:44.319 -0600
OS Version:      Mac OS X 10.6.8 (10K549)
Report Version:  6

Interval Since Last Report:          3784 sec
Crashes Since Last Report:           3
Per-App Crashes Since Last Report:   1
Anonymous UUID:                      46019B3E-D419-4DA6-8891-2EE38AC50908

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000032aaabaf
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   libpthread.20.dylib           	0x00469de5 pth_mutex_acquire + 37
1   libgpgme-pthread.11.dylib     	0x00334777 _gpgme_ath_mutex_lock + 22
2   libgpgme-pthread.11.dylib     	0x00331c6c _gpgme_debug_subsystem_init + 38
3   libgpgme-pthread.11.dylib     	0x00334455 gpgme_check_version + 44
4   libgpgme-pthread.11.dylib     	0x00334506 gpgme_check_version_internal + 32
5   libgmime-2.6.0.dylib          	0x0000947c g_mime_init + 78
6   test-streams                  	0x00003a9b main + 59
7   test-streams                  	0x00002235 start + 53

Thread 0 crashed with X86 Thread State (32-bit):
   eax: 0x32aaaba7  ebx: 0x00469dd8  ecx: 0x00000000  edx: 0x00000001
   edi: 0x32aaaba7  esi: 0x00339b00  ebp: 0xbfffba18  esp: 0xbfffb990
    ss: 0x0000001f  efl: 0x00010202  eip: 0x00469de5   cs: 0x00000017
    ds: 0x0000001f   es: 0x0000001f   fs: 0x00000000   gs: 0x00000037
   cr2: 0x32aaabaf
[…]

In the meantime, I've asked the new-Pan project team if they would consider
using a different crypto project, along the lines of what the GPGMail.org
folks are using for the Apple-Mail.app (which seems to work fine).

Otherwise I desperately need help in fixing this problem in gmime-2.6.x
please (not knowing anything about this code).

Shall I open a "real" bugreport?

Thank you.



_______________________________________________
gmime-devel-list mailing list
gmime-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gmime-devel-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]