fatal: unable to write new_index file
Silly little problem I ran into trying to perform a git status. Problem turned out to be a full partition.
A
Silly little problem I ran into trying to perform a git status. Problem turned out to be a full partition.
A
[2010-03-16 23:13:34] make
"parse.y", line 593: junk after `%%' in definition section
Ran into this trying to compile some gems for 1.9.2, installing bison instead of bison++ fixed it up for me.
sudo apt-get install bison
A
1)Developer drivers
2)CUDA Toolkit
3)CUDA SDK code samples
from NVIDIA.
In my case I grabbed 190.53 drivers, 64 bit CUDA Toolkit for Ubuntu 9.04, and the CUDA SDK code samples.
Note: most of the CUDA SDK stuff doesn’t work out of the box with gcc 4.4 yet, so use 4.3.
sudo apt-get install gcc-4.3 g++-4.3
You may have to update the symlink /usr/bin/gcc to point to gcc-4.3.
Some other libraries you may need:
sudo apt-get install libxi-dev libxmu-dev freeglut3-dev
You will have to drop out of X to install the drivers, note the command to start X back up if you don’t know it..
## to stop X
service gdm stop
sudo sh NVIDIA-Linux-x86_64-190.53-pkg2.run
## to start X up again
startx
sudo sh cudatoolkit_2.3_linux_64_ubuntu9.04.run
Modify your environment as it suggests, for example I added the following to my ~/.bashrc file:
export CUDA_BIN="/usr/local/cuda/bin"
export PATH=$PATH:$CUDA_BIN
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64
Source your bashrc to make the changes active, or open a new terminal.
source ~/.bashrc
Install and build the SDK
sudo sh cudasdk_2.3_linux.run
## cd to your NVIDIA_GPU_Computing_SDK/C
sudo make
Test it out, there should be a bunch of executables in created in the bin subdirectory..
cd bin/linux/release
./bandwithtest
Some errors you may encounter.
## missing glu.h
sudo apt-get install freeglut3-dev
## gcc: error trying to exec 'cc1plus'
## if you installed gcc 4.3 but not g++ 4.3 this may happen.
sudo apt-get install g++-4.3
## /usr/bin/ld: cannot find -lparamgl
## /usr/bin/ld: cannot find -lrendergl
## these are built as part of the CUDA SDK
## cd to your NVIDIA_GPU_Computing_SDK/C
sudo make
If you are seeing errors that resemble the following, they may be caused by having gcc/g++ 4.4.. install 4.3
error: inline function ‘void* memset(void*, int, size_t)’ cannot be declared weak
Encountered a problem where each rails process was growing to 600MB+ of memory usage. Got a pretty good idea where the usage was coming from with a memory dump of the process:
gcore 12345
strings core.12345 > text.dat
But! There is a great rails plug-in that can be used to monitor memory usage after each request and also the number of objects that were created. You can check out Oink at http://github.com/noahd1/oink
The plugin is easy to setup:
script/plugin install git://github.com/noahd1/oink.git
## add the following to application controller
include Oink::MemoryUsageLogger
include Oink::InstanceTypeCounter
and you get output that looks like the following after each request:
Memory usage: 166592 | PID: 12345
Instantiation Breakdown: Total: 176844 | Frog: 165715 | Dog: 8149 | Monkey: 2895 | Parrot: 85
From this we see that this request instantiated 165,000 frog objects.. which is way too many frogs..
A
Ran into this when I was setting up a Capistrano. I had setup my Github keys under my admin account, and not the account I had setup for Capistrano to use.
Make sure your keys are setup for the right account.
A
You probably forgot to make something public in your class:
class A {
A() {};
};
class A {
public:
A() {};
};
g++ ‘s version of the error message is a bit more clear:
error: A::A() is private
There is an awesome syntax error in the the following snippit. Either line 4 or line 5 has the error, see if you can spot it.
int main() {
int value = 0;
int othervalue = 1;
(50 + value – 1) / othervalue;
(50 + value - 1) / othervalue;
}
Here’s the error message from g++.
a.cpp:4: error: stray ‘\342’ in program
a.cpp:4: error: stray ‘\200’ in program
a.cpp:4: error: stray ‘\223’ in program
MSVS’s error message was something along the lines of:
expected `)' before numeric constant
So what’s the answer? The – on line 4 isn’t a -.
A
To set a borderStyle on a canvas you can do:
<mx:Canvas x="332" y="329" width="264" height="44" borderStyle="solid">
To set borderStyle and other styles in code you can use the setStyle method…
package com.devbaldwin.borderedCanvas
{
import mx.containers.Canvas;
public class borderedCanvas extends Canvas
{
public function borderedCanvas()
{
super();
this.setStyle("borderStyle", "solid");
}
}
}
A
Ran into the following, trying to use CUDA in Visual Studio 2010 beta 1:
error MSB4175: The task factory "XamlTaskFactory" could not be loaded from the assembly "Microsoft.Build.Tasks.v4.0". Unable to create Xaml task. Compilation failed.
error MSB4175: Unrecognized escape sequence
NVIDIA doesn’t currently support VS 2010 with CUDA. See this post.
One fix for the escaping issues is to turn the backslashes into forward slashes in the directory paths.
After fixing these you’ll probably have the build abort and complain about not supporting VS 2010. I stopped at this point and used 2008.
A
Problem 1:
gem install rmagick
was getting the following errors:
undefined method `fill' for (no primitives defined):Magick::Draw (NoMethodError)
undefined method `stroke' for (no primitives defined):Magick::Draw (NoMethodError)
ended up compiling RMagick from source
While doing that I ran into problem 2…
Problem 2:
checking for wand/MagickWand.h... no
Can't install RMagick 2.12.2. Can't find MagickWand.h
On Ubuntu, resolved it with the following:
apt-get install libmagickwand-dev
On CentOS I ended up compiling ImageMagick from source, and then set the cppflags to compile RMagick
export CPPFLAGS=-I/usr/someotherdir/ImageMagick
A