[pacman-dev] Unable to compile pacman in ubuntu-11.10
Hi, I have tried to do the Offline Installation as described in the ArchLinux wiki, but it did not worked out as i have mentioned in the thread http://stackoverflow.com/posts/comments/12588344. Hence i have planned to compile the pacman in a machine which has internet connection and then download the packages using the compiled pacman binary and then transfer it to offline ArchLinux Machine. While i tried to compile the pacman in Ubuntu-11.10 machine i got the following errors $ make # after ./autogen.sh && ./configure make all-recursive make[1]: Entering directory `/home/talespin/archlinux/pacman' Making all in lib/libalpm make[2]: Entering directory `/home/talespin/archlinux/pacman/lib/libalpm' Making all in po make[3]: Entering directory `/home/talespin/archlinux/pacman/lib/libalpm/po' test ! -f ./libalpm.pot || \ test -z "ca.gmo cs.gmo da.gmo de.gmo el.gmo en_GB.gmo es.gmo fi.gmo fr.gmo hu.gmo it.gmo kk.gmo lt.gmo nb.gmo pl.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo sk.gmo sr.gmo sr@latin.gmo sv.gmo tr.gmo uk.gmo zh_CN.gmo zh_TW.gmo" || make ca.gmo cs.gmo da.gmo de.gmo el.gmo en_GB.gmo es.gmo fi.gmo fr.gmo hu.gmo it.gmo kk.gmo lt.gmo nb.gmo pl.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo sk.gmo sr.gmo sr@latin.gmo sv.gmo tr.gmo uk.gmo zh_CN.gmo zh_TW.gmo make[4]: Entering directory `/home/talespin/archlinux/pacman/lib/libalpm/po' : --update --lang=ca ca.po libalpm.pot rm -f ca.gmo && : -c --statistics --verbose -o ca.gmo ca.po mv: cannot stat `t-ca.gmo': No such file or directory make[4]: *** [ca.gmo] Error 1 make[4]: Leaving directory `/home/talespin/archlinux/pacman/lib/libalpm/po' make[3]: *** [stamp-po] Error 2 make[3]: Leaving directory `/home/talespin/archlinux/pacman/lib/libalpm/po' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/talespin/archlinux/pacman/lib/libalpm' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/talespin/archlinux/pacman' make: *** [all] Error 2 I have cloned the source from git://projects.archlinux.org/pacman.git and tried compiling with the commit e6f72c61a098b52ea29e54b8eb4739a2ff81e6b0 and its parents(until commit ae25167bcd592186749b79ea31b10fb78ed9fb2d) with no success. Any ideas. Br, Talespin
On Tue, Mar 27, 2012 at 12:55 PM, Talespin Kit
Hi,
I have tried to do the Offline Installation as described in the ArchLinux wiki, but it did not worked out as i have mentioned in the thread http://stackoverflow.com/posts/comments/12588344. Hence i have planned to compile the pacman in a machine which has internet connection and then download the packages using the compiled pacman binary and then transfer it to offline ArchLinux Machine. While i tried to compile the pacman in Ubuntu-11.10 machine i got the following errors $ make # after ./autogen.sh && ./configure make all-recursive make[1]: Entering directory `/home/talespin/archlinux/pacman' Making all in lib/libalpm make[2]: Entering directory `/home/talespin/archlinux/pacman/lib/libalpm' Making all in po make[3]: Entering directory `/home/talespin/archlinux/pacman/lib/libalpm/po' test ! -f ./libalpm.pot || \ test -z "ca.gmo cs.gmo da.gmo de.gmo el.gmo en_GB.gmo es.gmo fi.gmo fr.gmo hu.gmo it.gmo kk.gmo lt.gmo nb.gmo pl.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo sk.gmo sr.gmo sr@latin.gmo sv.gmo tr.gmo uk.gmo zh_CN.gmo zh_TW.gmo" || make ca.gmo cs.gmo da.gmo de.gmo el.gmo en_GB.gmo es.gmo fi.gmo fr.gmo hu.gmo it.gmo kk.gmo lt.gmo nb.gmo pl.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo sk.gmo sr.gmo sr@latin.gmo sv.gmo tr.gmo uk.gmo zh_CN.gmo zh_TW.gmo make[4]: Entering directory `/home/talespin/archlinux/pacman/lib/libalpm/po' : --update --lang=ca ca.po libalpm.pot rm -f ca.gmo && : -c --statistics --verbose -o ca.gmo ca.po mv: cannot stat `t-ca.gmo': No such file or directory make[4]: *** [ca.gmo] Error 1 make[4]: Leaving directory `/home/talespin/archlinux/pacman/lib/libalpm/po' make[3]: *** [stamp-po] Error 2 make[3]: Leaving directory `/home/talespin/archlinux/pacman/lib/libalpm/po' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/talespin/archlinux/pacman/lib/libalpm' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/talespin/archlinux/pacman' make: *** [all] Error 2 I have cloned the source from git://projects.archlinux.org/pacman.git and tried compiling with the commit e6f72c61a098b52ea29e54b8eb4739a2ff81e6b0 and its parents(until commit ae25167bcd592186749b79ea31b10fb78ed9fb2d) with no success. Any ideas.
You probably need the gettext development package installed. You're going to have much better luck just transferring the pacman XZ zipped package to the machine and unzipping it directly in '/', then removing the /.PKGINFO and /.INSTALL file it will leave behind. -Dan
You're going to have much better luck just transferring the pacman XZ zipped package to the machine and unzipping it directly in '/', then removing the /.PKGINFO and /.INSTALL file it will leave behind.
I would like to modify the sources and understand the pacman code. so compiling the sources is a necessary.
You probably need the gettext development package installed.
I have installed the gettext package version 0.8.1.1-3ubuntu1 and it compiles the files in the **pacman/lib/libalpm/po** directory. Thank you for the info. But the make file reports error in **pacman/src/util** directory. $ make make all-recursive make[1]: Entering directory `/home/user/tmp/pacman' Making all in lib/libalpm make[2]: Entering directory `/home/user/tmp/pacman/lib/libalpm' Making all in po make[3]: Entering directory `/home/user/tmp/pacman/lib/libalpm/po' make[3]: Leaving directory `/home/user/tmp/pacman/lib/libalpm/po' make[3]: Entering directory `/home/user/tmp/pacman/lib/libalpm' make[3]: Nothing to be done for `all-am'. make[3]: Leaving directory `/home/user/tmp/pacman/lib/libalpm' make[2]: Leaving directory `/home/user/tmp/pacman/lib/libalpm' Making all in src/util make[2]: Entering directory `/home/user/tmp/pacman/src/util' CCLD testpkg ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Init' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Final' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Init' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Update' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Update' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Final' Seems like MD5 related library has to be installed. I do not know which one to install. I was expecting ./configure scritpt to report about these required libraries. Br, Talespin
On Wed, Mar 28, 2012 at 9:02 AM, Talespin Kit
You're going to have much better luck just transferring the pacman XZ zipped package to the machine and unzipping it directly in '/', then removing the /.PKGINFO and /.INSTALL file it will leave behind.
I would like to modify the sources and understand the pacman code. so compiling the sources is a necessary.
You probably need the gettext development package installed.
I have installed the gettext package version 0.8.1.1-3ubuntu1 and it compiles the files in the **pacman/lib/libalpm/po** directory. Thank you for the info.
But the make file reports error in **pacman/src/util** directory.
$ make make all-recursive make[1]: Entering directory `/home/user/tmp/pacman' Making all in lib/libalpm make[2]: Entering directory `/home/user/tmp/pacman/lib/libalpm' Making all in po make[3]: Entering directory `/home/user/tmp/pacman/lib/libalpm/po' make[3]: Leaving directory `/home/user/tmp/pacman/lib/libalpm/po' make[3]: Entering directory `/home/user/tmp/pacman/lib/libalpm' make[3]: Nothing to be done for `all-am'. make[3]: Leaving directory `/home/user/tmp/pacman/lib/libalpm' make[2]: Leaving directory `/home/user/tmp/pacman/lib/libalpm' Making all in src/util make[2]: Entering directory `/home/user/tmp/pacman/src/util' CCLD testpkg ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Init' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Final' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Init' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Update' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Update' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Final'
Seems like MD5 related library has to be installed. I do not know which one to install. I was expecting ./configure scritpt to report about these required libraries.
Br, Talespin
sounds like you didn't google, since googling this issue shows me that people tried to include openssl.h. So the issue could be that you are missing openssl-dev. Take a look at pacman's dependencies with: pactree pacman -- Jelle van der Waa
sounds like you didn't google, since googling this issue shows me that
people tried to include openssl.h. So the issue could be that you are missing openssl-dev. Take a look at pacman's dependencies with:
I initally thought that might be problem and looked at the ./configure output which reported (also libssl-dev is installed) ....... checking whether to link with libssl... yes checking for MD5_Final in -lssl... yes ...... Found library "gpgme" was missing. After installing it below is the following error from signing.c file make[3]: Entering directory `/home/user/tmp/pacman/lib/libalpm' CC signing.lo signing.c: In function 'key_search': signing.c:301:8: error: 'GPGME_PK_ECDSA' undeclared (first use in this function) signing.c:301:8: note: each undeclared identifier is reported only once for each function it appears in signing.c:302:8: error: 'GPGME_PK_ECDH' undeclared (first use in this function) make[3]: *** [signing.lo] Error 1 make[3]: Leaving directory `/home/user/tmp/pacman/lib/libalpm' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/user/tmp/pacman/lib/libalpm' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/user/tmp/pacman' make: *** [all] Error 2
On 28/03/12 20:10, Talespin Kit wrote:
sounds like you didn't google, since googling this issue shows me that
people tried to include openssl.h. So the issue could be that you are missing openssl-dev. Take a look at pacman's dependencies with:
I initally thought that might be problem and looked at the ./configure output which reported (also libssl-dev is installed) ....... checking whether to link with libssl... yes checking for MD5_Final in -lssl... yes ......
Found library "gpgme" was missing. After installing it below is the following error from signing.c file
make[3]: Entering directory `/home/user/tmp/pacman/lib/libalpm' CC signing.lo signing.c: In function 'key_search': signing.c:301:8: error: 'GPGME_PK_ECDSA' undeclared (first use in this function) signing.c:301:8: note: each undeclared identifier is reported only once for each function it appears in signing.c:302:8: error: 'GPGME_PK_ECDH' undeclared (first use in this function) make[3]: *** [signing.lo] Error 1 make[3]: Leaving directory `/home/user/tmp/pacman/lib/libalpm' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/user/tmp/pacman/lib/libalpm' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/user/tmp/pacman' make: *** [all] Error 2
That requires gpgme-1.3.0 which was released over two years ago... That is entirely unrelated to your issue with "undefined reference to `MD5_Init'". Attach your configure and build output if you want help with that. Allan
Below is the output of ./configure script.
$ ./autogen.sh && ./configure
+ aclocal -I m4 --install
+ autoheader
+ automake --foreign
+ autoconf
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for gawk... (cached) gawk
checking for curl-config... /usr/bin/curl-config
checking for the version of libcurl... 7.21.6
checking for libcurl >= version 7.19.4... yes
checking whether libcurl is usable... yes
checking for curl_free... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for gawk... (cached) gawk
checking for gcc option to accept ISO C99... -std=gnu99
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc -std=gnu99... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert i686-pc-linux-gnu file names to i686-pc-linux-gnu format... func_convert_file_noop
checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc -std=gnu99 object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc -std=gnu99 supports -fno-rtti -fno-exceptions... no
checking for gcc -std=gnu99 option to produce PIC... -fPIC -DPIC
checking if gcc -std=gnu99 PIC flag -fPIC -DPIC works... yes
checking if gcc -std=gnu99 static flag -static works... yes
checking if gcc -std=gnu99 supports -c -o file.o... yes
checking if gcc -std=gnu99 supports -c -o file.o... (cached) yes
checking whether the gcc -std=gnu99 linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for ranlib... (cached) ranlib
checking for python2.7... python2.7
checking for bash... /bin/bash
checking whether NLS is requested... yes
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking for fabs in -lm... yes
checking for archive_read_data in -larchive... yes
checking whether to link with libssl... yes
checking for MD5_Final in -lssl... yes
checking whether to link with libgpgme... yes
checking for gpgme-config... /usr/bin/gpgme-config
checking for GPGME - version >= 0.4.2... yes
checking for sane gpgme... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking glob.h usability... yes
checking glob.h presence... yes
checking for glob.h... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking mntent.h usability... yes
checking mntent.h presence... yes
checking for mntent.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking netinet/tcp.h usability... yes
checking netinet/tcp.h presence... yes
checking for netinet/tcp.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for string.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/mnttab.h usability... no
checking sys/mnttab.h presence... no
checking for sys/mnttab.h... no
checking sys/mount.h usability... yes
checking sys/mount.h presence... yes
checking for sys/mount.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/statvfs.h usability... yes
checking sys/statvfs.h presence... yes
checking for sys/statvfs.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for sys/types.h... (cached) yes
checking sys/ucred.h usability... no
checking sys/ucred.h presence... no
checking for sys/ucred.h... no
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking for inline... inline
checking for int64_t... yes
checking for mode_t... yes
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for ssize_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for uid_t in sys/types.h... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for struct dirent.d_type... yes
checking PATH_MAX defined... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for library containing getmntent... none required
checking whether lstat correctly handles trailing slash... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/time.h... (cached) yes
checking for unistd.h... (cached) yes
checking for alarm... yes
checking for working mktime... yes
checking for working strcoll... yes
checking for dup2... yes
checking for getcwd... yes
checking for geteuid... yes
checking for getmntinfo... no
checking for gettimeofday... yes
checking for memmove... yes
checking for memset... yes
checking for mkdir... yes
checking for realpath... yes
checking for regcomp... yes
checking for rmdir... yes
checking for setenv... yes
checking for setlocale... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strcspn... yes
checking for strdup... yes
checking for strerror... yes
checking for strndup... yes
checking for strrchr... yes
checking for strsep... yes
checking for strstr... yes
checking for strtol... yes
checking for swprintf... yes
checking for tcflush... yes
checking for wcwidth... yes
checking for uname... yes
checking for struct stat.st_blksize... yes
checking filesystem statistics type... checking for getmntinfo... (cached) no
checking for getmntent... (cached) yes
struct statvfs
checking for struct statvfs.f_flag... yes
checking for struct statfs.f_flags... no
checking whether gcc -std=gnu99 accepts -fvisibility=internal... yes
checking for -fgnu89-inline... yes
checking for asciidoc... asciidoc
checking for building documentation... yes, enabled by configure
checking for doxygen... no
checking for doxygen... no, disabled by configure
checking for debug mode request... no
checking whether to use git version if available... no, disabled by configure
configure: creating ./config.status
config.status: creating lib/libalpm/Makefile
config.status: creating lib/libalpm/po/Makefile.in
config.status: creating src/pacman/Makefile
config.status: creating src/pacman/po/Makefile.in
config.status: creating src/util/Makefile
config.status: creating scripts/Makefile
config.status: creating scripts/po/Makefile.in
config.status: creating doc/Makefile
config.status: creating etc/Makefile
config.status: creating test/pacman/Makefile
config.status: creating test/pacman/tests/Makefile
config.status: creating test/util/Makefile
config.status: creating contrib/Makefile
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing po-directories commands
config.status: creating lib/libalpm/po/POTFILES
config.status: creating lib/libalpm/po/Makefile
config.status: creating src/pacman/po/POTFILES
config.status: creating src/pacman/po/Makefile
config.status: creating scripts/po/POTFILES
config.status: creating scripts/po/Makefile
pacman:
Build information:
source code location : .
prefix : /usr/local
sysconfdir : /usr/local/etc
conf file : /usr/local/etc/pacman.conf
localstatedir : /usr/local/var
database dir : /usr/local/var/lib/pacman/
cache dir : /usr/local/var/cache/pacman/pkg/
compiler : gcc -std=gnu99
preprocessor flags :
compiler flags : -g -O2 -Wall
defines : -DHAVE_CONFIG_H
library flags : -lssl -larchive -lm -lgpgme -L/usr/lib/i386-linux-gnu -lgpg-error
linker flags :
Architecture : i686
Host Type : i686-pc-linux-gnu
Filesize command : stat -c %s
In-place sed command : sed -i
libalpm version : 7.0.2
libalpm version info : 7:2:0
pacman version : 4.0.2
using git version : no
Directory and file information:
root working directory : /
package extension : .pkg.tar.gz
source pkg extension : .src.tar.gz
build script name : PKGBUILD
Compilation options:
Use libcurl : yes
Use GPGME : yes
Use OpenSSL : yes
Run make in doc/ dir : yes
Doxygen support : no
debug support : no
________________________________
From: Allan McRae
sounds like you didn't google, since googling this issue shows me that
people tried to include openssl.h. So the issue could be that you are missing openssl-dev. Take a look at pacman's dependencies with:
I initally thought that might be problem and looked at the ./configure output which reported (also libssl-dev is installed) ....... checking whether to link with libssl... yes checking for MD5_Final in -lssl... yes ......
Found library "gpgme" was missing. After installing it below is the following error from signing.c file
make[3]: Entering directory `/home/user/tmp/pacman/lib/libalpm' CC signing.lo signing.c: In function 'key_search': signing.c:301:8: error: 'GPGME_PK_ECDSA' undeclared (first use in this function) signing.c:301:8: note: each undeclared identifier is reported only once for each function it appears in signing.c:302:8: error: 'GPGME_PK_ECDH' undeclared (first use in this function) make[3]: *** [signing.lo] Error 1 make[3]: Leaving directory `/home/user/tmp/pacman/lib/libalpm' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/user/tmp/pacman/lib/libalpm' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/user/tmp/pacman' make: *** [all] Error 2
That requires gpgme-1.3.0 which was released over two years ago... That is entirely unrelated to your issue with "undefined reference to `MD5_Init'". Attach your configure and build output if you want help with that. Allan
Some improvement over the build by providing --without-gpgme arg to
./configure script .
The complete steps is mentioned below
$ git clean -xfd; ./autogen.sh && ./configure --without-gpgme && make
..........
make[3]: Leaving directory `/home/user/tmp/pacman/lib/libalpm'
make[2]: Leaving directory `/home/user/tmp/pacman/lib/libalpm'
Making all in src/util
make[2]: Entering directory `/home/user/tmp/pacman/src/util'
CC vercmp.o
CCLD vercmp
CC testpkg.o
CCLD testpkg
../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Init'
../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Final'
../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Init'
../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Update'
../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Update'
../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Final'
The actual command executed while tryint to linking is found by running dry make (make -n )
cd pacman/src/util
$ /bin/bash ../../libtool --silent --tag=CC --mode=link gcc -std=gnu99 -pedantic -D_GNU_SOURCE -g -O2 -Wall -o testpkg testpkg.o ../../lib/libalpm/.libs/libalpm.la -lssl -larchive -lm
../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Init'
../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Final'
../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Init'
../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Update'
../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Update'
../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Final'
collect2: ld returned 1 exit status
Now finding which library contains **MD5_Init** symbol using the below
bash commands
for i in `find /usr/lib -type f -name '*.so.*'`;
do
nm -D $i | grep MD5_Init;
if [ $? -eq 0 ];
then
echo $i;
fi;
done
Output:-
======
00004320 T MD5_Init
/usr/lib/i386-linux-gnu/libgnutls-openssl.so.26.16.14
Now linking with the libgnutls-openssl library
$ /bin/bash ../../libtool --silent --tag=CC --mode=link gcc -std=gnu99 -pedantic -D_GNU_SOURCE -g -O2 -Wall -o testpkg testpkg.o ../../lib/libalpm/.libs/libalpm.la -lssl -larchive -lm -lgnutls-openssl
../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Init'
../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Update'
../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Final'
collect2: ld returned 1 exit status
Only MD5_* symbols are able to find by ld.
Problem with SHA256_* symbols. Finding the **SHA256_Init** symbol
using the above bash commands outputs.
00187db0 T SHA256_Init
/usr/lib/libgs.so.9.04
Trying to link with the libgs.so.9.04 library gives the following error.
$ /bin/bash ../../libtool --silent --tag=CC --mode=link gcc -std=gnu99 -pedantic -D_GNU_SOURCE -g -O2 -Wall -o testpkg testpkg.o ../../lib/libalpm/.libs/libalpm.la -lssl -larchive -lm -lgnutls-openssl -lgs
/usr/bin/ld: cannot find -lgs
collect2: ld returned 1 exit status
No idea why the linker fails to find the libgs library.
________________________________
From: Talespin Kit
sounds like you didn't google, since googling this issue shows me that
people tried to include openssl.h. So the issue could be that you are missing openssl-dev. Take a look at pacman's dependencies with:
I initally thought that might be problem and looked at the ./configure output which reported (also libssl-dev is installed) ....... checking whether to link with libssl... yes checking for MD5_Final in -lssl... yes ......
Found library "gpgme" was missing. After installing it below is the following error from signing.c file
make[3]: Entering directory `/home/user/tmp/pacman/lib/libalpm' CC signing.lo signing.c: In function 'key_search': signing.c:301:8: error: 'GPGME_PK_ECDSA' undeclared (first use in this function) signing.c:301:8: note: each undeclared identifier is reported only once for each function it appears in signing.c:302:8: error: 'GPGME_PK_ECDH' undeclared (first use in this function) make[3]: *** [signing.lo] Error 1 make[3]: Leaving directory `/home/user/tmp/pacman/lib/libalpm' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/user/tmp/pacman/lib/libalpm' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/user/tmp/pacman' make: *** [all] Error 2
That requires gpgme-1.3.0 which was released over two years ago... That is entirely unrelated to your issue with "undefined reference to `MD5_Init'". Attach your configure and build output if you want help with that. Allan
On Thu, Mar 29, 2012 at 04:42:04AM -0700, Talespin Kit wrote:
Some improvement over the build by providing --without-gpgme arg to ./configure script .
The complete steps is mentioned below
$ git clean -xfd; ./autogen.sh && ./configure --without-gpgme && make
.......... make[3]: Leaving directory `/home/user/tmp/pacman/lib/libalpm' make[2]: Leaving directory `/home/user/tmp/pacman/lib/libalpm' Making all in src/util make[2]: Entering directory `/home/user/tmp/pacman/src/util' CC vercmp.o CCLD vercmp CC testpkg.o CCLD testpkg ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Init' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Final' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Init' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Update' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Update' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Final'
The actual command executed while tryint to linking is found by running dry make (make -n )
cd pacman/src/util
$ /bin/bash ../../libtool --silent --tag=CC --mode=link gcc -std=gnu99 -pedantic -D_GNU_SOURCE -g -O2 -Wall -o testpkg testpkg.o ../../lib/libalpm/.libs/libalpm.la -lssl -larchive -lm ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Init' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Final' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Init' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Update' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Update' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Final' collect2: ld returned 1 exit status
Now finding which library contains **MD5_Init** symbol using the below
bash commands
for i in `find /usr/lib -type f -name '*.so.*'`; do nm -D $i | grep MD5_Init; if [ $? -eq 0 ];
then
echo $i; fi; done
Output:-
====== 00004320 T MD5_Init /usr/lib/i386-linux-gnu/libgnutls-openssl.so.26.16.14
No, that's the wrong library -- we link against openssl's libcrypto. Is libssl-dev installed? NB: I've yet to be able to build pacman successfully against anything involving gnutls, and i've even had build failures when libarchive linked to gnutls (though that may have been resolved by binutils 2.22).
Now linking with the libgnutls-openssl library
$ /bin/bash ../../libtool --silent --tag=CC --mode=link gcc -std=gnu99 -pedantic -D_GNU_SOURCE -g -O2 -Wall -o testpkg testpkg.o ../../lib/libalpm/.libs/libalpm.la -lssl -larchive -lm -lgnutls-openssl ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Init' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Update' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Final' collect2: ld returned 1 exit status
Only MD5_* symbols are able to find by ld.
Problem with SHA256_* symbols. Finding the **SHA256_Init** symbol using the above bash commands outputs.
00187db0 T SHA256_Init /usr/lib/libgs.so.9.04
This is ghostscript... I assure you we don't link against this. It should all be covered by openssl.
Trying to link with the libgs.so.9.04 library gives the following error.
$ /bin/bash ../../libtool --silent --tag=CC --mode=link gcc -std=gnu99 -pedantic -D_GNU_SOURCE -g -O2 -Wall -o testpkg testpkg.o ../../lib/libalpm/.libs/libalpm.la -lssl -larchive -lm -lgnutls-openssl -lgs /usr/bin/ld: cannot find -lgs collect2: ld returned 1 exit status
No idea why the linker fails to find the libgs library.
On Thu, Mar 29, 2012 at 08:17:51AM -0400, Dave Reisner wrote:
On Thu, Mar 29, 2012 at 04:42:04AM -0700, Talespin Kit wrote:
Some improvement over the build by providing --without-gpgme arg to ./configure script .
The complete steps is mentioned below
$ git clean -xfd; ./autogen.sh && ./configure --without-gpgme && make
.......... make[3]: Leaving directory `/home/user/tmp/pacman/lib/libalpm' make[2]: Leaving directory `/home/user/tmp/pacman/lib/libalpm' Making all in src/util make[2]: Entering directory `/home/user/tmp/pacman/src/util' CC vercmp.o CCLD vercmp CC testpkg.o CCLD testpkg ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Init' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Final' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Init' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Update' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Update' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Final'
The actual command executed while tryint to linking is found by running dry make (make -n )
cd pacman/src/util
$ /bin/bash ../../libtool --silent --tag=CC --mode=link gcc -std=gnu99 -pedantic -D_GNU_SOURCE -g -O2 -Wall -o testpkg testpkg.o ../../lib/libalpm/.libs/libalpm.la -lssl -larchive -lm ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Init' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Final' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Init' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Update' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Update' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Final' collect2: ld returned 1 exit status
Now finding which library contains **MD5_Init** symbol using the below
bash commands
for i in `find /usr/lib -type f -name '*.so.*'`; do nm -D $i | grep MD5_Init; if [ $? -eq 0 ];
then
echo $i; fi; done
Output:-
====== 00004320 T MD5_Init /usr/lib/i386-linux-gnu/libgnutls-openssl.so.26.16.14
No, that's the wrong library -- we link against openssl's libcrypto. Is libssl-dev installed?
NB: I've yet to be able to build pacman successfully against anything involving gnutls, and i've even had build failures when libarchive linked to gnutls (though that may have been resolved by binutils 2.22).
Now linking with the libgnutls-openssl library
$ /bin/bash ../../libtool --silent --tag=CC --mode=link gcc -std=gnu99 -pedantic -D_GNU_SOURCE -g -O2 -Wall -o testpkg testpkg.o ../../lib/libalpm/.libs/libalpm.la -lssl -larchive -lm -lgnutls-openssl ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Init' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Update' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Final' collect2: ld returned 1 exit status
Only MD5_* symbols are able to find by ld.
Problem with SHA256_* symbols. Finding the **SHA256_Init** symbol using the above bash commands outputs.
00187db0 T SHA256_Init /usr/lib/libgs.so.9.04
This is ghostscript... I assure you we don't link against this. It should all be covered by openssl.
Trying to link with the libgs.so.9.04 library gives the following error.
$ /bin/bash ../../libtool --silent --tag=CC --mode=link gcc -std=gnu99 -pedantic -D_GNU_SOURCE -g -O2 -Wall -o testpkg testpkg.o ../../lib/libalpm/.libs/libalpm.la -lssl -larchive -lm -lgnutls-openssl -lgs /usr/bin/ld: cannot find -lgs collect2: ld returned 1 exit status
No idea why the linker fails to find the libgs library.
Ok, so I just compiled this on a 10.04 install... $ ./configure --prefix=/usr --sysconfdir=/etc \ --localstatedir=/var --enable-git-version \ --enable-debug --without-gpgme readelf shows the following linkages: $ readelf -d ./lib/libalpm/.libs/libalpm.so Dynamic section at offset 0x29d58 contains 27 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libcurl-gnutls.so.4] 0x0000000000000001 (NEEDED) Shared library: [libssl.so.0.9.8] 0x0000000000000001 (NEEDED) Shared library: [libarchive.so.2] 0x0000000000000001 (NEEDED) Shared library: [libm.so.6] 0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x000000000000000e (SONAME) Library soname: [libalpm.so.7] ... $ readelf -d ./src/pacman/.libs/pacman Dynamic section at offset 0x18de0 contains 27 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libalpm.so.7] 0x0000000000000001 (NEEDED) Shared library: [libcurl-gnutls.so.4] 0x0000000000000001 (NEEDED) Shared library: [libssl.so.0.9.8] 0x0000000000000001 (NEEDED) Shared library: [libarchive.so.2] 0x0000000000000001 (NEEDED) Shared library: [libm.so.6] 0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] ... dave
Finally managed to compile in ubuntu-11.10.
Seems the problem was the Makefile generated by the configure script for the **libalpm**
does not add the **libcrypto** as dependency in the LIBS variable.
Below is the steps.
I have used the git commit e6f72c61a098b52ea29e54b8eb4739a2ff81e6b0in
repo git://projects.archlinux.org/pacman.git
1) $ git clean -xfd; ./autogen.sh && ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
--enable-git-version --enable-debug --without-gpgme
2) cd lib/libalpm
3) In the Makefile replace line
LIBS = -lssl -larchive -lm
with
LIBS = -lssl -larchive -lm -lcrypto
4) cd ../../ && make
------
TalespinKit
________________________________
From: Dave Reisner
On Thu, Mar 29, 2012 at 04:42:04AM -0700, Talespin Kit wrote:
Some improvement over the build by providing --without-gpgme arg to ./configure script .
The complete steps is mentioned below
$ git clean -xfd; ./autogen.sh && ./configure --without-gpgme && make
.......... make[3]: Leaving directory `/home/user/tmp/pacman/lib/libalpm' make[2]: Leaving directory `/home/user/tmp/pacman/lib/libalpm' Making all in src/util make[2]: Entering directory `/home/user/tmp/pacman/src/util' CC vercmp.o CCLD vercmp CC testpkg.o CCLD testpkg ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Init' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Final' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Init' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Update' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Update' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Final'
The actual command executed while tryint to linking is found by running dry make (make -n )
cd pacman/src/util
$ /bin/bash ../../libtool --silent --tag=CC --mode=link gcc -std=gnu99 -pedantic -D_GNU_SOURCE -g -O2 -Wall -o testpkg testpkg.o ../../lib/libalpm/.libs/libalpm.la -lssl -larchive -lm ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Init' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Final' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Init' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Update' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Update' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Final' collect2: ld returned 1 exit status
Now finding which library contains **MD5_Init** symbol using the below
bash commands
for i in `find /usr/lib -type f -name '*.so.*'`; do nm -D $i | grep MD5_Init; if [ $? -eq 0 ];
then
echo $i; fi; done
Output:-
====== 00004320 T MD5_Init /usr/lib/i386-linux-gnu/libgnutls-openssl.so.26.16.14
No, that's the wrong library -- we link against openssl's libcrypto. Is libssl-dev installed?
NB: I've yet to be able to build pacman successfully against anything involving gnutls, and i've even had build failures when libarchive linked to gnutls (though that may have been resolved by binutils 2.22).
Now linking with the libgnutls-openssl library
$ /bin/bash ../../libtool --silent --tag=CC --mode=link gcc -std=gnu99 -pedantic -D_GNU_SOURCE -g -O2 -Wall -o testpkg testpkg.o ../../lib/libalpm/.libs/libalpm.la -lssl -larchive -lm -lgnutls-openssl ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Init' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Update' ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Final' collect2: ld returned 1 exit status
Only MD5_* symbols are able to find by ld.
Problem with SHA256_* symbols. Finding the **SHA256_Init** symbol using the above bash commands outputs.
00187db0 T SHA256_Init /usr/lib/libgs.so.9.04
This is ghostscript... I assure you we don't link against this. It should all be covered by openssl.
Trying to link with the libgs.so.9.04 library gives the following error.
$ /bin/bash ../../libtool --silent --tag=CC --mode=link gcc -std=gnu99 -pedantic -D_GNU_SOURCE -g -O2 -Wall -o testpkg testpkg.o ../../lib/libalpm/.libs/libalpm.la -lssl -larchive -lm -lgnutls-openssl -lgs /usr/bin/ld: cannot find -lgs collect2: ld returned 1 exit status
No idea why the linker fails to find the libgs library.
Ok, so I just compiled this on a 10.04 install... $ ./configure --prefix=/usr --sysconfdir=/etc \ --localstatedir=/var --enable-git-version \ --enable-debug --without-gpgme readelf shows the following linkages: $ readelf -d ./lib/libalpm/.libs/libalpm.so Dynamic section at offset 0x29d58 contains 27 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libcurl-gnutls.so.4] 0x0000000000000001 (NEEDED) Shared library: [libssl.so.0.9.8] 0x0000000000000001 (NEEDED) Shared library: [libarchive.so.2] 0x0000000000000001 (NEEDED) Shared library: [libm.so.6] 0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x000000000000000e (SONAME) Library soname: [libalpm.so.7] ... $ readelf -d ./src/pacman/.libs/pacman Dynamic section at offset 0x18de0 contains 27 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libalpm.so.7] 0x0000000000000001 (NEEDED) Shared library: [libcurl-gnutls.so.4] 0x0000000000000001 (NEEDED) Shared library: [libssl.so.0.9.8] 0x0000000000000001 (NEEDED) Shared library: [libarchive.so.2] 0x0000000000000001 (NEEDED) Shared library: [libm.so.6] 0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] ... dave
participants (5)
-
Allan McRae
-
Dan McGee
-
Dave Reisner
-
Jelle van der Waa
-
Talespin Kit