Yubico/yubico-c

Build under Solaris 10

northox opened this issue · 2 comments

Hello guys,

I'm no Solaris or Automake/Makefile expert but here's the step I took to compile yubico-c.

First off, autoreconf --install would fire the following error.

# autoreconf --install
/usr/share/aclocal/vorbis.m4:9: warning: underquoted definition of XIPH_PATH_VORBIS
  run info '(automake)Extending aclocal'
  or see http://sources.redhat.com/automake/automake.html#Extending%20aclocal
/usr/share/aclocal/vorbis-old.m4:9: warning: underquoted definition of AM_PATH_VORBIS
/usr/share/aclocal/pkg.m4:5: warning: underquoted definition of PKG_CHECK_MODULES
/usr/share/aclocal/ogg.m4:8: warning: underquoted definition of XIPH_PATH_OGG
/usr/share/aclocal/ogg-old.m4:8: warning: underquoted definition of AM_PATH_OGG
/usr/share/aclocal/esd.m4:10: warning: underquoted definition of AM_PATH_ESD
/usr/share/aclocal/esd.m4:175: warning: underquoted definition of AM_ESD_SUPPORTS_MULTIPLE_RECORD
/usr/share/aclocal/audiofile.m4:12: warning: underquoted definition of AM_PATH_AUDIOFILE
/usr/sfw/share/aclocal/gtk.m4:7: warning: underquoted definition of AM_PATH_GTK
/usr/sfw/share/aclocal/glib.m4:8: warning: underquoted definition of AM_PATH_GLIB
/usr/sfw/share/aclocal/gimpprint.m4:8: warning: underquoted definition of AM_PATH_GIMPPRINT
aclocal: configure.ac: 41: macro `AM_SILENT_RULES' not found in library
aclocal: macro `LTOBSOLETE_VERSION' required but not defined
aclocal: macro `_LT_PREPARE_SED_QUOTE_VARS' required but not defined
aclocal: macro `_LT_PROG_ECHO_BACKSLASH' required but not defined
aclocal: macro `_LT_DECL_SED' required but not defined
aclocal: macro `_LT_PROG_ECHO_BACKSLASH' required but not defined
aclocal: macro `_LT_FUNC_STRIPNAME_CNF' required but not defined
autoreconf: aclocal failed with exit status: 1

I couldn't find anything helpful to resolve this so I tried using make -f simple.mk check but cc was not found:

# make -f simple.mk check
cc -I. -Wall -g  -c  yktoken.c
sh: cc: not found
*** Error code 1
make: Fatal error: Command failed for target `yktoken.o'

I add the following to simple.mk:

CC=gcc

Then I got a standard compliance issue:

# make -f simple.mk check
gcc -I. -Wall -g  -c  yktoken.c
In file included from yktoken.c:36:
/usr/include/stdbool.h:42:2: #error "Use of <stdbool.h> is valid only in a c99 compilation environment."
*** Error code 1
make: Fatal error: Command failed for target `yktoken.o'

Which I fixed by adding -std=c99 at the end of the CFLAGS arguments. At this point I figure nothing was getting linked since selftest could not be found just like any other binary (e.g. ykparse, ykgenerate, modhex).

# make -f simple.mk check
tests/selftest
sh: tests/selftest: not found
*** Error code 1
make: Fatal error: Command failed for target `check'

I used the line provided by the README file: cc -I. -Wall -g modhex.c yktoken.o ykmodhex.o ykhex.o ykcrc.o ykaes.o yubikey.h -o modhex but with the previous modification to finaly build the binaries gcc -std=c99 -I. -Wall -g modhex.c yktoken.o ykmodhex.o ykhex.o ykcrc.o ykaes.o yubikey.h -o modhex.

In hope this is helpful to fix the build process.

regards,

Hold on. Seems like I've been using a old version of automake (i.e. 1.8.3). I'll try to get the right one: 1.11 at least.

]] Danny Fullerton

Hold on. Seems like I've been using a old version of automake
(i.e. 1.8.3). I'll try to get the right one: 1.11 at least.

Make sure you upgrade/install libtool too. Some of the errors were
related to that.

Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are