New answers tagged

2

Core dumping is disabled by default in Ubuntu by setting the maximum dumping file size to 0 for all users. You can check this by: ulimit -c By default it would show 0. Now to enable core dumping, set the size to the value you want (or unlimited). For example, setting the maximum dumping file size as 4 KB: ulimit -c 8 -c takes block numbers with each ...


2

Section 6.39 Dollar Signs in Identifier Names of the GCC manual states: In GNU C, you may normally use dollar signs in identifier names. This is because many traditional C implementations allow such identifiers. However, dollar signs in identifiers are not supported on a few target machines, typically because the target assembler does not allow them.


0

Makefile:2357: recipe for target 'libigraph.la' failed Line 2357 : That's a missing "libxml2-dev" : sudo apt-get install libxml2-dev libgmp-dev zlib1g-dev Note : The igraph library is not a 3party library. Is just one of the ~100,000 pieces of open source code / libraries / applications. (The license is "GNU GENERAL PUBLIC LICENSE".)


0

I had the same problem here. Then after googling, I found solution (i hope) on How to fix "Package is in a very bad inconsistent state" error? Run: sudo mv /var/lib/dpkg/info/<packagename>.* /tmp/ sudo dpkg --remove --force-remove-reinstreq <packagename> sudo apt-get remove <packagename> sudo apt-get autoremove && sudo ...


0

The toolchain repository requires https access, so because of the error E: The method driver /usr/lib/apt/methods/https could not be found. your package catalogue is not being updated even though you have successfully added the repository. You can find some suggestions to fix the error at “method driver /usr/lib/apt/methods/https could not be found” ...


0

Getting g++-4.4 / gcc-4.4 : gedit /etc/apt/sources.list Then add two new lines to the file : deb [URL] trusty main universe deb [URL] trusty-updates main universe My example : deb http://dk.archive.ubuntu.com/ubuntu/ trusty main universe deb http://dk.archive.ubuntu.com/ubuntu/ trusty-updates main universe Run sudo apt-get update, and you can install ...


1

You'll want to add a -Idir flag to your CXX flags in the make file and likely the cmake file. The dir would be the path to the headers you do want to use. If just including the proper directories doesn't work then it would be best to also disable the default include paths with --nostdinc but this shouldn't be needed since it searches the include directories ...


3

Your question What gcc -o sample sample.c actually does The command you have pasted triggers gcc to compile sample.c. As a result you'll get an output/executable with the same sample. The parameters (as -o in your example which defined the name of the output file ) are explained in the man page of gcc. You can open it by running man gcc I am quoting the ...


1

GCC is GNU C (language) compiler. It's used to "convert" programs written in C programming language into binary executable on computer. The syntax gcc -o sample sample.c means: Compile the file sample.c and name the output sample. Then you can launch your compiled program with <path_to_file>/sample, or from within the directory ./sample The default ...


1

The package installation of other architecture compilers puts them into a system area. The executables are uniquely named, but the package is too "helpful" and thinks you really need a short name link (like gcc) to point to them, and whoa, another package already uses that link, gotta delete it for you. This might be fine in a virtual machine, dedicated to ...


0

It happened to me with anaconda 4.0.0 (as @mjp stated), but the fix for me was to issue a: $ conda install libgcc in my environment


0

Getting g++-4.4, gcc-4.4 with Ubuntu15.10 : Add one line to /etc/apt/sources.list , like : sudo gedit /etc/apt/sources.list Text to be added, (with my example URL) : deb http://dk.archive.ubuntu.com/ubuntu/ trusty main universe ... Then run sudo apt-get update && sudo apt-get install g++-4.4 ... and you have : /usr/bin/{ gcc-4.4, g++-4.4 }.


2

How about adding more swap to your machine as a solution? This will add more virtual memory and may allow you to build your code without the OOM killer killing the compiler. If you don't want to fiddle around with making your swap partition larger your could add a temporary swap file. For example, adding a file based 4GB swap: dd if=/dev/zero of=swap.img ...


-1

Have you tried using nice? It allows to set a custom priority for your processes. nice ranges from -20 to 19, being 19 the lowest priority and -20 the highest. You could try something like this: nice -n 19 command_you_want_to_execute Example: nice -n 19 firefox Edit: ellaborating a bit on my response, if your OS kills your process it's because is using ...


0

I got the same issue and found a solution. But I never consider about my gcc version. This solution works fine on kernel 4.6.x. Need to change some c codes. Actually this solution for fedora but works well on Ubuntu 16.04 kernel 4.6.x.x. find following archives on /usr/lib/vmware/modules/source vmmon.tar vmnet.tar Before make any changes backup ...


1

As we can see from your diagnostic output, gcc uses the external program as (which is /usr/bin/as) - the GNU assembler - and it is this that is failing. Somehow, it appears that the as binary executable has been corrupted on your system, to the point where even /usr/bin/as --version causes a bus error. (Although apparently it is intact enough for the file ...


1

If you want to build it from source (which I recommend as you can for example make a cross-compiler, etc.) download the source from a mirror. Then extract it with: tar -xvf gcc-6.1.0.tar.gz After that change directory to there: cd gcc-6.1.0 Then create build directory and cd to it: mkdir build cd build Then configure the makefile: ../configure --...


4

You can install GCC 6 by adding the ubuntu-toolchain-r/test PPA. To do so, run the following commands: sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt update sudo apt install gcc-6 You can verify that gcc-6 is installed by running gcc-6 --version and the output should say gcc-6 (Ubuntu 6.1.1-2ubuntu12~16.04) 6.1.1 20160510. As suggested by ...


1

You are probably running a 64-bit Linux, but that application you use doesn't support 64-bit binaries for simulation. So just add -m32 to your g++ line. g++ -m32 matx.cpp -o matx As suggested: The ELF file being loaded is a 64-bit file, currently not supported by Multi2Sim. If you are compiling your own source code on a 64-bit machine, please ...



Top 50 recent answers are included