Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 560234 - app-admin/gkrellm[X,gnutls]: build fails with undefined reference to MD5Init/etc...
Summary: app-admin/gkrellm[X,gnutls]: build fails with undefined reference to MD5Init/...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
: 582542 (view as bug list)
Depends on:
Blocks: gnutls-3.5-breakage
  Show dependency tree
Reported: 2015-09-11 19:06 UTC by Attila Stehr
Modified: 2017-03-11 20:12 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---

build log of gkrellm-2.3.6_rc1 (app-admin_gkrellm-2.3.6_rc1_20150911-210634.log,22.72 KB, text/x-log)
2015-09-11 21:19 UTC, Attila Stehr
/tmp/portage/portage/app-admin/gkrellm-2.3.6_rc1/work/gkrellm-2.3.6-rc1/src/configure.log (configure.log,403 bytes, text/x-log)
2015-09-12 09:43 UTC, Attila Stehr
Patch for Makefile (gkrellm-2.3.6-make.patch,317 bytes, patch)
2015-09-12 19:19 UTC, Felix Janda
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Attila Stehr 2015-09-11 19:06:51 UTC
I'm not getting a clean build for gkrellm-2.3.6-rc
I found this in the logs:  

fgets(buf, sizeof(buf), f);
sysdeps/linux.c: In function ‘sysfs_get_chip_name’:
sysdeps/linux.c:3525:2: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
  fscanf(f, "%255[^\n]", buf);
x86_64-pc-linux-gnu-gcc main.o alerts.o battery.o base64.o clock.o cpu.o disk.o fs.o hostname.o inet.o mail.o mem.o net.o proc.o sensors.o uptime.o chart.o panel.o config.o gui.o krell.o plugins.o pixops.o client.o utils.o sysdeps-unix.o deprecated.o log.o winops-x11.o  -o gkrellm \
        -Wl,-O1 -Wl,--as-needed `pkg-config --libs gtk+-2.0 gmodule-2.0 gthread-2.0`  -lX11 -lSM -lICE   "-lsensors"  -lm -Wl,-E
mail.o: In function `do_cram_md5.constprop.18':
mail.c:(.text+0x5f31): undefined reference to `MD5Init'
mail.c:(.text+0x5f4e): undefined reference to `MD5Update'
mail.c:(.text+0x5f61): undefined reference to `MD5Final'
mail.c:(.text+0x600b): undefined reference to `MD5Init'
mail.c:(.text+0x6026): undefined reference to `MD5Update'
mail.c:(.text+0x6038): undefined reference to `MD5Update'
mail.c:(.text+0x604b): undefined reference to `MD5Final'
mail.c:(.text+0x6057): undefined reference to `MD5Init'
mail.c:(.text+0x606b): undefined reference to `MD5Update'
mail.c:(.text+0x6083): undefined reference to `MD5Update'
mail.c:(.text+0x6096): undefined reference to `MD5Final'
mail.o: In function `check_pop3':
mail.c:(.text+0x66a1): undefined reference to `MD5Init'
mail.c:(.text+0x66e8): undefined reference to `MD5Update'
mail.c:(.text+0x66fb): undefined reference to `MD5Final'
collect2: error: ld returned 1 exit status
Makefile:96: recipe for target 'gkrellm' failed
make[1]: *** [gkrellm] Error 1
make[1]: Leaving directory '/tmp/portage/portage/app-admin/gkrellm-2.3.6_rc1/work/gkrellm-2.3.6-rc1/src'
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
 * ERROR: app-admin/gkrellm-2.3.6_rc1::gentoo failed (compile phase):
 *   emake failed

For me that looks like gkrellm needs MD5 support.
Comment 1 Felix Janda 2015-09-11 21:00:04 UTC
Please post the full build log.
Comment 2 Attila Stehr 2015-09-11 21:19:47 UTC
Created attachment 411636 [details]
build log of gkrellm-2.3.6_rc1
Comment 3 SpanKY gentoo-dev 2015-09-11 22:00:30 UTC
probably builds if you use USE=-gnutls as those look like openssl symbols
Comment 4 Attila Stehr 2015-09-11 22:43:39 UTC
Yes it builds with USE="-gnutls". 
Now, I'd like to use gnutls. Is this an upstream bug?
Comment 5 Felix Janda 2015-09-12 05:57:58 UTC
Definitely partially an upstream bug. and do have MD5_Init but not
MD5Init. How could this ever have worked? Maybe we can just rename
MD5Init, MD5_Update and MD5_Final.

What is still strange is that the log says "--without-ssl=yes"
although USE=gnutls (and accordingly the linker line does not contain
the gnutls libs.
Comment 6 Felix Janda 2015-09-12 07:31:09 UTC
Looking closer, I don't see any problem (and cannot reproduce).

mail.c defines MD5Init to MD5_Init when gnutls is found.

Passing --without-ssl without --without-gnutls to make does indeed make
it use gnutls.

@Attila: Could you also post /mnt/ramdisk/portage/app-admin/gkrellm-2.3.6_rc1/work/src/configure.log ?
Comment 7 Attila Stehr 2015-09-12 09:43:42 UTC
Created attachment 411696 [details]

Ah, that looks interesting...

CC    : x86_64-pc-linux-gnu-gcc
CFLAGS: -march=native -O2 -pipe
PKG_CONFIG: pkg-config
Checking for gnutls...
test.c:1:28: fatal error: gnutls/openssl.h: No such file or directory
 #include <gnutls/openssl.h>
compilation terminated.
x86_64-pc-linux-gnu-gcc: error: test.o: No such file or directory
GnuTLS not found...
Checking for libsensors...
Comment 8 Felix Janda 2015-09-12 09:48:12 UTC
So gkrellm[gnutls] should depend on gnutls[openssl].
Test this by trying to emerge gkrellm after rebuilding gnutls with USE=openssl.
Comment 9 Attila Stehr 2015-09-12 11:22:20 UTC
Yes, that worked.
Isn't one purpose of using gnutls that I choose it over/insteat of openssl?
Comment 10 Prakash Punnoor 2015-09-12 12:41:41 UTC
Fails here with the same error with these flags:

app-admin/gkrellm-2.3.6_rc1:2::gentoo [2.3.5-r3:2::gentoo] USE="X hddtemp lm_sensors nls -gnutls -ntlm -ssl"
Comment 11 Felix Janda 2015-09-12 19:17:12 UTC
@Attila: USE=openssl for gnutls just makes gnutls ship an additional
library for compatibility with openssl. It is not using openssl itself.
Comment 12 Felix Janda 2015-09-12 19:19:20 UTC
Created attachment 411738 [details, diff]
Patch for Makefile

@Prakash: Please see whether this patch fixes the build failures for you.
Comment 13 Prakash Punnoor 2015-09-18 22:59:32 UTC
Sorry for reporting back late. But yes, your patch helped in my case.
Comment 14 Pacho Ramos gentoo-dev 2016-01-27 21:44:05 UTC
Is anyone willing to proxy maintain this?
Comment 15 Alex Xu (Hello71) 2016-05-11 17:52:12 UTC
*** Bug 582542 has been marked as a duplicate of this bug. ***
Comment 16 Alon Bar-Lev (RETIRED) gentoo-dev 2017-03-11 20:12:56 UTC
Seems to be fixed in gkrellm-2.3.10