compilation

gcc: confused about -static -shared -fPIE -fPIC -Wl,-pie

痴心易碎 提交于 2019-12-22 18:38:13
问题 I'm trying to build clang, with all library static linked in. So that I can run it on CentOS 6 with ancient GCC 4.4 version. At first, I think adding the option -static by turning on LLVM_BUILD_STATIC is enough. But in the link stage, it errors out. dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in `/usr/lib/../lib64/libc.a(strcmp.o)' can not be used when making an executable; recompile with -fPIE and relink with -pie So, I add -fPIE -Wl,-pie to CMAKE_CXX_FLAGS, and it says --

gcc: confused about -static -shared -fPIE -fPIC -Wl,-pie

此生再无相见时 提交于 2019-12-22 18:38:02
问题 I'm trying to build clang, with all library static linked in. So that I can run it on CentOS 6 with ancient GCC 4.4 version. At first, I think adding the option -static by turning on LLVM_BUILD_STATIC is enough. But in the link stage, it errors out. dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in `/usr/lib/../lib64/libc.a(strcmp.o)' can not be used when making an executable; recompile with -fPIE and relink with -pie So, I add -fPIE -Wl,-pie to CMAKE_CXX_FLAGS, and it says --

C# dynamic compilation of string and .cs file

怎甘沉沦 提交于 2019-12-22 18:37:16
问题 I'm working on a website where a user can implement a C# code solution to a problem in a browser text area and submit it. The server will then compile that code together with a predefined interface I provide on the server. Think of it as a strategy design pattern; I provide a strategy interface and users implement it. So I need to compile a string and a predefined *.cs file together at run-time. Here's the code I have now that compiles only the string portion: CodeDomProvider codeProvider =

How pip install pylzma on windows 7 x64 , python 2.7

隐身守侯 提交于 2019-12-22 18:37:09
问题 I assumed this should be working out of the box, but ... i've pasted pip.log on pastbin the last few lines of error message is e:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWITH_COMPAT=1 -DCOMPRESS_MF_MT=1 -Isrc/sdk -IC:\Python27\include -IC:\Python27\PC /Tcsrc\7zip\C\AesOpt.c /Fobuild\temp.win-amd64-2.7\Release\src\7zip\C\AesOpt.obj /MT cl : Command line warning D9025 : overriding '/MD' with '/MT' AesOpt.c src\7zip\C\AesOpt.c(14

Why does including -fPIC to compile a static library cause a segmentation fault at run time?

匆匆过客 提交于 2019-12-22 18:35:07
问题 I'm compiling C++ static library with g++ and using the -fPIC option. I must use the -fPIC option because eventually this library will be linked with other static libraries to form a dynamic library. When I test the static library locally, it works completely fine when I don't include the -fPIC option. But as soon as I compile the library with -fPIC, I receive a segmentation fault error at run-time when calling one of the functions. What reasons could including -fPIC to compile a static

Why does including -fPIC to compile a static library cause a segmentation fault at run time?

半腔热情 提交于 2019-12-22 18:34:22
问题 I'm compiling C++ static library with g++ and using the -fPIC option. I must use the -fPIC option because eventually this library will be linked with other static libraries to form a dynamic library. When I test the static library locally, it works completely fine when I don't include the -fPIC option. But as soon as I compile the library with -fPIC, I receive a segmentation fault error at run-time when calling one of the functions. What reasons could including -fPIC to compile a static

How to generate the machine code of Thumb instructions?

空扰寡人 提交于 2019-12-22 18:27:25
问题 I searched Google for generating machine code of ARM instructions, such as this one Converting very simple ARM instructions to binary/hex The answer referenced ARM7TDMI-S Data Sheet (ARM DDI 0084D). The diagram of data processing instructions is good enough. Unfortunately, it's for ARM instructions, not for Thumb/Thumb-2 instructions. Take the B instruction as an example. ARM Architecture Reference Manual - ARMv7-A and ARMv7-R edition section A8.8.18, Encoding T4: For the assembly code: B

vaadin gwt compiler error unknown argument: -war

夙愿已清 提交于 2019-12-22 18:15:56
问题 I have a problem with my vaadin project - and as i am rather new to vaadin, i am not sure on how to solve it. I would like to re-compile my widgetset, but even after customizing eclipse i get the same error message: First it executes the compiler via command line Next it tells me that the widgetsets were found from a certain classpath (which still is correct) And after that, I get the following output: 17.09.2013 11:10:18 com.vaadin.terminal.gwt.widgetsetutils.ClassPathExplorer

Compiling openssl 1.0.0e, “openssl version” still returns 0.9.8k.. What am i doing wrong?

蹲街弑〆低调 提交于 2019-12-22 18:06:19
问题 I am trying to install openssl 1.0.0e on Ubuntu 10.0.4 LTS I tried using some procedures one of which was ./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl sudo make sudo make install After this it installs without errors but when i do openssl version it still tells me OpenSSL 0.9.8k 25 Mar 2009 What am I doing wrong? 回答1: Do which openssl to find out which copy you are running - I suspect it's the default, older one. You'll need to set PATH to contain /usr/local/openssl

AddressSanitizer / LeakSanitizer Error with -lsupc++ and -stdlib=libc++ on a never called virtual function that writes to a stream

徘徊边缘 提交于 2019-12-22 17:57:22
问题 The following code throws an AddressSanitizer Error when compiled on Debian Jessie with clang 3.5. It appears to be related to the combination of linked libraries, but i have not been able to find something similar on the internet. Reproduction of the Error Invocation: clang++ -stdlib=libc++ -lc++abi -fsanitize=address,vptr sample.cpp -lsupc++ -o sample //sample.cpp #include <iostream> class Foo { virtual void bar() { std::cerr << std::endl; } public: virtual ~Foo() { } }; int main() { Foo