Closed zchcai closed 5 years ago
Which version of LLVM are you using? Could you post a copy of your env here?
The version generated by your scripts
The /nobackup/llvm/Release/bin
is in the PATH.
$ echo $PATH
/u/z/h/zhicheng/.opam/4.02.3+PIC/bin:/usr/local/sbin:/usr/local/bin:/usr/games:/usr/local/games:/u/z/h/zhicheng/.npm-packages/bin:/s/std/bin:/u/z/h/zhicheng/local/bin:/usr/afsws/bin:/bin:/sbin:/usr/bin:/usr/sbin:/nobackup/bin:/u/z/h/zhicheng/bin:/u/z/h/zhicheng/node-latest-install/node_modules/solgraph:/nobackup/porosity/porosity/porosity:/nobackup/goapp/bin:/nobackup/llvm/Release/bin:/nobackup/ripgrep/0.8.1:/nobackup/anaconda3/bin
Do you have any CFLAGS or similar in your environment? I am seeing flags such a "-fpermissive" in the output that I do not have in my builds.
Thank you for your reply. But there is no CFLAGS in my env. Probably it is the ninja
that makes things worse. Is there a compiling way without using ninja
?
$ printenv
CAML_LD_LIBRARY_PATH=/u/z/h/zhicheng/.opam/4.02.3+PIC/lib/stublibs
XDG_VTNR=7
MANPATH=/u/z/h/zhicheng/.npm-packages/share/man:/u/z/h/zhicheng/local/share/man:/usr/share/man:/usr/local/share/man:/u/z/h/zhicheng/.opam/4.02.3+PIC/man
XDG_SESSION_ID=c2
HOSTNAME=
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/zhicheng
CLUTTER_IM_MODULE=xim
SESSION=ubuntu
TERM=xterm-256color
VTE_VERSION=4205
XDG_MENU_PREFIX=gnome-
SHELL=/bin/bash
PERL5LIB=/u/z/h/zhicheng/.opam/4.02.3+PIC/lib/perl5:/u/z/h/zhicheng/.opam/4.02.3+PIC/lib/perl5:/u/z/h/zhicheng/.opam/4.02.3+PIC/lib/perl5:
QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1
WINDOWID=73478572
OLDPWD=/nobackup
UPSTART_SESSION=unix:abstract=/com/ubuntu/upstart-session/19629/2094
GNOME_KEYRING_CONTROL=
GTK_MODULES=gail:atk-bridge:unity-gtk-module
OCAML_TOPLEVEL_PATH=/u/z/h/zhicheng/.opam/4.02.3+PIC/lib/toplevel
USER=zhicheng
LD_LIBRARY_PATH=/nobackup/z3/build
QT_ACCESSIBILITY=1
UNITY_HAS_3D_SUPPORT=true
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
SSH_AUTH_SOCK=/run/user/19629/keyring/ssh
DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path
SESSION_MANAGER=local/taxi:@/tmp/.ICE-unix/2304,unix/taxi:/tmp/.ICE-unix/2304
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg
UNITY_DEFAULT_PROFILE=unity
DESKTOP_SESSION=ubuntu
PATH=/u/z/h/zhicheng/.opam/4.02.3+PIC/bin:/usr/local/sbin:/usr/local/bin:/usr/games:/usr/local/games:/u/z/h/zhicheng/.npm-packages/bin:/s/std/bin:/u/z/h/zhicheng/local/bin:/usr/afsws/bin:/bin:/sbin:/usr/bin:/usr/sbin:/nobackup/bin:/u/z/h/zhicheng/bin:/u/z/h/zhicheng/node-latest-install/node_modules/solgraph:/nobackup/porosity/porosity/porosity:/nobackup/goapp/bin:/nobackup/llvm/Release/bin:/nobackup/ripgrep/0.8.1:/nobackup/anaconda3/bin
QT_IM_MODULE=fcitx
QT_QPA_PLATFORMTHEME=appmenu-qt5
XDG_SESSION_TYPE=x11
PWD=/nobackup
JOB=unity-settings-daemon
XMODIFIERS=@im=fcitx
GNOME_KEYRING_PID=
LANG=en_US.UTF-8
GDM_LANG=en_US
MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path
COMPIZ_CONFIG_PROFILE=ubuntu
IM_CONFIG_PHASE=1
PS1=[\u@\h] (\#)$
GDMSESSION=ubuntu
KRB5CCNAME=/var/adm/krb5/tmp/tkt/krb5cc_19629_8yxWky
SESSIONTYPE=gnome-session
GTK2_MODULES=overlay-scrollbar
SHLVL=1
HOME=/u/z/h/zhicheng
XDG_SEAT=seat0
LANGUAGE=en_US:
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
UPSTART_INSTANCE=
PYTHONPATH=/nobackup/z3/build/python
UPSTART_EVENTS=xsession started
XDG_SESSION_DESKTOP=ubuntu
LOGNAME=zhicheng
COMPIZ_BIN_PATH=/usr/bin/
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-WF7uw6hmbC
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/var/lib/snapd/desktop
QT4_IM_MODULE=fcitx
GOPATH=/nobackup/goapp
INSTANCE=
UPSTART_JOB=unity7
XDG_RUNTIME_DIR=/run/user/19629
DISPLAY=:0
XDG_CURRENT_DESKTOP=Unity
GTK_IM_MODULE=fcitx
XAUTHORITY=/u/z/h/zhicheng/.Xauthority
_=/usr/bin/printenv
I am still looking at the issue. Can you post the results of the following commands for me?
/usr/bin/c++ --verison
uname -a
$ /usr/bin/c++ --version
c++ (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ uname -a
Linux taxi 4.4.0-137-generic #163-Ubuntu SMP Mon Sep 24 13:14:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Thank you! (taxi
is my hostname)
If you want to use makefiles instead of Ninja, you can leave the "-G Ninja" out of the cmake command. On a Linux system, this should generate standard makefiles.
I am not convinced this will fix the issue. Since Loom is developed and used by the CADETS project mainly in FreeBSD we generally build it using LLVM (clang++). In theory, it should be buildable via gcc as long as the Loom library is linked against LLVM after compilation. I am going to build up an Ubuntu VM and see if I can test your configuration on replicate the issue.
thanks
This has been resolved as follows:
$ pwd
/nobackup/loom
$ git diff
diff --git a/src/Strings.cc b/src/Strings.cc
index 4d33ae7..f21af7e 100644
--- a/src/Strings.cc
+++ b/src/Strings.cc
@@ -32,6 +32,7 @@
#include <algorithm>
#include <sstream>
+#include <iterator>
using namespace std;
Then, under the /nobackup/loom/Release
, run: cmake -G Ninja -DCMAKE_CXX_COMPILER=/nobackup/llvm-3.8.0/bin/clang++ -DCMAKE_C_COMPILER=/nobackup/llvm-3.8.0/bin/clang -D CMAKE_BUILD_TYPE=Release -DLLVM_DIR=/nobackup/llvm/Release/lib/cmake/llvm/ ..
, where /nobakcup/llvm
is the llvm provided in loom, and llvm-3.8.0
is another version of binary.
For the PATH setting, use the llvm-3.8.0
.
At last, use /nobackup/llvm/Release/bin/opt -load /nobackup/loom/Release/lib/LLVMLoom.so --help
to check.