-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues while compiling Zsim on linux x86-64 #1
Comments
You have a linker problem here which is unrelated to zsim. You either have not installed libpthread.a or you don't have it in your path or a softlink might be messed up. There should be tons of hits on google. Try locating libpthread first and check that its path is known by the linker. |
Thanks for the hints. The version.h file is generated as follows #define ZSIM_BUILDDATE "Wed Apr 30 14:30:22 EDT 2014"\n#define I think \n should be executed, not printed as such. Can you please give more hints on SYS_getcpu. I commented that line and it The sys_getcpu problem suggests that you are running an old version of your Thanks and Regards On Wed, Apr 30, 2014 at 12:58 PM, hlitz notifications@github.com wrote:
|
Some old versions of glibc apparently don't define SYS_getcpu, even though it's a valid syscall. Try adding #define SYS_getcpu (168) to the code. No guarantees it'll work though, you should update to a more recent kernel & glibc if possible. For the \n, try either using /bin/echo or echo -e in SConstruct... you seem to be using an echo that doesn't grok the newline. |
Thanks a lot for your reply. Thanks and Regards On Thu, May 1, 2014 at 7:55 PM, Daniel Sanchez notifications@github.comwrote:
|
It compiled well with SYS_getcpu definition you told. Thanks and Regards On Fri, May 2, 2014 at 9:16 AM, Sparsh Mittal sparsh0mittal@gmail.comwrote:
|
I get the following 2 errors:
/usr/bin/ld: cannot find -lpthread
build/opt/virt/patchdefs.h:41:1: error: ‘SYS_getcpu’ was not declared in this scope
I tried to search on internet, but could not resolve. Here is the detailed log:
g++ -o build/opt/fftoggle -Wl,-R/home/esm/bin/libconfig/lib --static build/opt/fftoggle.o build/opt/config.o build/opt/galloc.o build/opt/log.o build/opt/pin_cmd.o -L/home/esm/bin/libconfig/lib -lconfig++ -lpthread
/usr/bin/ld: cannot find -lpthread
collect2: error: ld returned 1 exit status
g++ -o build/opt/virt/virt.os -c -fPIC -march=core2 -g -O3 -funroll-loops -g -std=c++0x -Wall -Wno-unknown-pragmas -fomit-frame-pointer -fno-stack-protector -MMD -DBIGARRAY_MULTIPLIER=1 -DUSING_XED -DTARGET_IA32E -DHOST_IA32E -fPIC -DTARGET_LINUX -Werror -DPIN_PATH="/home/esm/PIN/pin-2.10-45467-gcc.3.4.6-ia32_intel64-linux/intel64/bin/pinbin" -DZSIM_PATH="/home/esm/Zsim/zsim/build/opt/libzsim.so" -DMT_SAFE_LOG -I/home/esm/PIN/pin-2.10-45467-gcc.3.4.6-ia32_intel64-linux/extras/xed2-intel64/include -I/home/esm/PIN/pin-2.10-45467-gcc.3.4.6-ia32_intel64-linux/source/include -I/home/esm/PIN/pin-2.10-45467-gcc.3.4.6-ia32_intel64-linux/source/include/gen -I/home/esm/PIN/pin-2.10-45467-gcc.3.4.6-ia32_intel64-linux/extras/components/include -I/home/esm/bin/libconfig/include -Ibuild/opt build/opt/virt/virt.cpp
echo "#define ZSIM_BUILDDATE ""
date
""\n#define ZSIM_BUILDVERSION ""python misc/gitver.py
""" >>build/opt/version.hscons: *** [build/opt/fftoggle] Error 1
In file included from build/opt/virt/virt.cpp:69:0:
build/opt/virt/patchdefs.h: In function ‘void VirtInit()’:
build/opt/virt/patchdefs.h:41:1: error: ‘SYS_getcpu’ was not declared in this scope
scons: *** [build/opt/virt/virt.os] Error 1
scons: building terminated because of errors.
The text was updated successfully, but these errors were encountered: