Can't build ‘pure’, missed ‘bison-missing’

Issue #21 closed
Viacheslav Lotsmanov
created an issue

Hello. I can't build the ‘pure’:

$ LANG= make
bison-missing -v -o ./ parser.yy
make: bison-missing: Command not found
make: *** [] Error 127

What is ‘bison-missing'? I can't google anything about that. I have ‘bison’ package on my OpenSUSE 13.1 (x86_64), but this package is not provides ‘bison-missing’:

$ LANG= zypper search bison
S | Name        | Summary                  | Type   
i | bison       | The GNU Parser Generator | package
  | bison-32bit | The GNU Parser Generator | package

Comments (9)

  1. Viacheslav Lotsmanov reporter
    $ LANG= bison --version
    bison (GNU Bison) 2.7
    Written by Robert Corbett and Richard Stallman.
    Copyright (C) 2012 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
  2. Albert Graef

    Ok, it seems that configure neither finds bison nor flex. That's weird, because you seem to be able to run it from the command line, and then configure should be able to locate it as well. What does which bison and which flex say?

    Are you sure that you reran configure after installing bison and flex?

  3. Viacheslav Lotsmanov reporter

    It's look like I forgot to rerun configure again after installing bison and flex. Now I've run ./configure --prefix=/opt/... again and make and it works without bison or flex errors. Sorry about that.

    But now I have other issue with LLVM

    $ LANG= make
    g++ -o pure -L.  pure.o -lpure  -L/usr/lib64   -lrt -ldl -lpthread -lz -lm -lmpfr -lgmp  -lreadline
    /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: pure.o: undefined reference to symbol 'LLVMLinkInJIT'
    /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: note: 'LLVMLinkInJIT' is defined in DSO /usr/lib64/ so try adding it to the linker command line
    /usr/lib64/ could not read symbols: Invalid operation
    collect2: error: ld returned 1 exit status
    make: *** [pure] Error 1

    But it's correct dynamic library file:

    $ cd /usr/lib64/ && env LANG= ls -lah | grep -i
    -rwxr-xr-x   1 root root  112K Oct 29 15:24
  4. Albert Graef

    This looks like your LLVM_LIBS is empty, which points to a broken LLVM installation, bad llvm-config, or both. Please post the output from the following commands:

    llvm-config --version
    llvm-config --libdir
    llvm-config --ldflags
    llvm-config --libs jit
    ls /usr/lib/libLLVM*

    Also, please attach your generated Makefile and the new config.log.

    One thing that you can try is to add --with-static-llvm to your configure command and see whether that helps.

    If that fails as well, then I'd suggest that you build LLVM 3.3 yourself. This isn't hard. You can find the LLVM 3.3 downloads here: (LLVM 3.4 should work as well, but its assembler backend seems to be broken on x86 Linux which affects Pure's batch compiler, so I'd recommend to stick to LLVM 3.3 for now.)

    Make sure that you build LLVM with the default prefix (/usr/local) so that it doesn't conflict with your openSUSE LLVM packages. Also make sure that you build it as a shared library (--enable-shared), as described in the INSTALL file, see This should work. I'm running Pure with a home-built LLVM 3.3 myself, and it builds and works without a hitch for me.

  5. Log in to comment