compilation

f951 error: unrecognized command line option

Deadly 提交于 2021-02-19 07:10:47
问题 I am on linux and I am compiling the following: mpif90 -shared source.F90 object1.o object2.o -L/some/path -Qoption,link,-rpath=/some/path -I/some/path -lhdf5 -lhdf5_fortran -fPIC -fpp -DDECDEC_ -DMSMS_ -cxxlib-gcc -o libhdfwrapper.so and I get f95: unrecognized option '-Qoption,link,-rpath=/some/path' f95: unrecognized option '-cxxlib-gcc' f951: error: unrecognized command line option "-fpp" can anybody tell me why fpp is not recognized? 回答1: -fpp is a flag used by some compilers, notably

Linking error: selective static linking of libm.a in GCC

浪尽此生 提交于 2021-02-19 03:52:28
问题 I want to selectively link libm.a statically, all the other libraries ( libc.so included) dinamically. But if I use the math functions from math.h , it almost always fails to link correctly. Why? And why does it work sometimes? (For example if I only use sqrt , fabs or, strangely, tanh , it seems to link correctly) myscript.sh: #!/bin/bash for i in sqrt tanh sin tan do echo "-----$i----------" sed "s/ciao/$i/" prova.c >provat.c gcc provat.c -fno-builtin -l:libm.a [[ $? -eq 0 ]] && { echo -n "

How to write an LLVM backend for stack machine?

天涯浪子 提交于 2021-02-19 03:37:28
问题 When I'm trying to build an LLVM backend without defining RegisterClass instances in TableGen file, it throws the following error: error:No 'RegisterClass' subclasses defined How to define a stack machine target for LLVM (i.e. that doesn't use registers)? 回答1: Just don't do it. LLVM DAG is designed specifically for the register machines and is of a little value for a stack machine compilation. You'd need a custom backend instead. One approach I was using for a similar problem (LLVM IR ->

How can an object be created from a static block?

对着背影说爱祢 提交于 2021-02-19 03:14:42
问题 Consider two classes in a default package : class Trial { int a; int b; public static void main (String [] args){ System.out.println("test base"); } } public class TrialExe { int a; int b; public static void main (String [] args){ Trial t = new Trial(); System.out.println("test exe"); } } Compiling TrialExe: javac TrialExe How can this compile?. Considering that the Trial object is created from a static block, to create an object the constructor of Trial is required, but as far as I know we

compiling glibc from source with debug symbols

时间秒杀一切 提交于 2021-02-19 02:27:08
问题 I need to compile glibc from source with debug symbols . 1.Where do i specify the '-g' option for this 2.How do i later make a sample code link to this particular glibc rather than the one installed on my system? 回答1: I need to compile glibc from source with debug symbols You will have hard time compiling glibc without debug symbols. A default ./configure && make will have -g on compile line. How do i later make a sample code link to this particular glibc rather than the one installed on my

How do I enable on-the-fly compilation of JSPs in Wildfly 9?

心已入冬 提交于 2021-02-19 01:15:24
问题 I’m using Wildfly 9.0.0.CR2. How do I enable on-the-fly compilation of JSPs? I found this configuration in another thread <subsystem xmlns="urn:jboss:domain:web:1.4" default-virtual-server="default-host" native="false"> <configuration> <jsp-configuration development="true" check-interval="1" modification-test-interval="1" recompile-on-fail="true"/> </configuration> </subsystem> but alas, it doesn’t work, result in gin the below exception when I restart my JBoss server … 14:23:05,224 ERROR

How do I enable on-the-fly compilation of JSPs in Wildfly 9?

只谈情不闲聊 提交于 2021-02-19 01:14:05
问题 I’m using Wildfly 9.0.0.CR2. How do I enable on-the-fly compilation of JSPs? I found this configuration in another thread <subsystem xmlns="urn:jboss:domain:web:1.4" default-virtual-server="default-host" native="false"> <configuration> <jsp-configuration development="true" check-interval="1" modification-test-interval="1" recompile-on-fail="true"/> </configuration> </subsystem> but alas, it doesn’t work, result in gin the below exception when I restart my JBoss server … 14:23:05,224 ERROR

How to build a swift executable for Linux on macOS

混江龙づ霸主 提交于 2021-02-18 22:28:08
问题 I am trying to build a swift executable on my MacBook for my Linux vServer. I already tried using swiftc -target "x86_64-linux test.swift , but my macOS swift compiler shows this error: <unknown>:0: error: unable to load standard library for target 'x86_64--linux' So I looked around and found this question: Swift on OS X compiling for Linux? and tried out this example script from apple to setup a cross-platform toolchain. After trying to build a module like shown in the example text of the

How to build a swift executable for Linux on macOS

你。 提交于 2021-02-18 22:28:06
问题 I am trying to build a swift executable on my MacBook for my Linux vServer. I already tried using swiftc -target "x86_64-linux test.swift , but my macOS swift compiler shows this error: <unknown>:0: error: unable to load standard library for target 'x86_64--linux' So I looked around and found this question: Swift on OS X compiling for Linux? and tried out this example script from apple to setup a cross-platform toolchain. After trying to build a module like shown in the example text of the

gcc canaries : undefined reference to __stack_chk_guard

巧了我就是萌 提交于 2021-02-18 22:16:52
问题 I'm trying to enable gcc' s canaries' generation but I get an undefined reference to __stack_chk_guard. From gcc's man about canaries : -mstack-protector-guard=guard Generate stack protection code using canary at guard. Supported locations are global for global canary or tls for per-thread canary in the TLS block (the default). This option has effect only when -fstack-protector or -fstack-protector-all is specified. These -m switches are supported in addition to the above on x86-64 processors