Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-1533

[openbsd] static complation fails - Makefile:814: recipe for target 'cf3parse.lo' failed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Unconfirmed
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Platform:
      Other (details)

      Description

      Static compilation fails on OpenBSD 5.5 -current amd64. Building non-statically passed successfully.

      $ ./configure --enable-static=yes --enable-shared=no --with-openssl=/usr --with-pcre --with-qdbm --without-libxml2 --without-libvirt --without-mysql --without-postgresql
      ...snip...
      In file included from ../libpromises/eval_context.h:33,
      from unix_iface.c:27:
      ../libpromises/var_expressions.h:56: warning: type qualifiers ignored on function return type
      unix_iface.c: In function 'GetMacAddress':
      unix_iface.c:125: warning: unused parameter 'fd'
      CC zones.lo
      CCLD libenv.la
      Making all in libpromises
      LEX cf3lex.c
      YACC cf3parse.c
      updating cf3parse.h
      CC cf3parse.lo
      cf3parse.y: In function 'yyparse':
      cf3parse.y:493: error: 'YYEOF' undeclared (first use in this function)
      cf3parse.y:493: error: (Each undeclared identifier is reported only once
      cf3parse.y:493: error: for each function it appears in.)
      Makefile:814: recipe for target 'cf3parse.lo' failed
      gmake[3]: *** [cf3parse.lo] Error 1
      Makefile:607: recipe for target 'all' failed
      gmake[2]: *** [all] Error 2
      Makefile:582: recipe for target 'all-recursive' failed
      gmake[1]: *** [all-recursive] Error 1
      Makefile:505: recipe for target 'all' failed
      gmake: *** [all] Error 2

      Some comments from OpenBSD porters how to build statically on OpenBSD:

      > Correction: -static implies -nopie (linker flag), not -fno-pie (compiler
      > flag).
      >
      > -fno-pie: Do not generate position-independent code
      > -nopie: Do not try to link a position-independent binary
      >
      > So a program that wishes to turn off PIE should use -fno-pie while
      > compiling and -static while linking. Also note that -nopie is an
      > OpenBSD-only flag, so for a portable project, it is probably better to
      > rely on the fact that -static implies -nopie.

        Attachments

          Activity

            People

            • Assignee:
              a10040 Kristian Amlie
              Reporter:
              jirib Jiri Belka
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Summary Panel