Welcome! This *was* my blog at some point.
This blog is a wiki. Feel free to edit any page.
This website is amazing. If you make an edit, then you are amazing as well.
A few people think that some of the stuff I write is offensive. This is not true. If you find it offensive, then there is a problem with your cognitive process.
Non-instructional posts are dedicated to people who can read more than 2 sentences in a row.
I decided to post about interesting things I notice.
Here's one of the most interesting comments on a bug report I've ever seen:
https://rt.perl.org/Ticket/Display.html?id=128462#txn-1494756
cc1
, cc1plus
and lto1
binaries so that it accepts any xclm
binary.These instructions are mostly based on this page: http://www.jubatian.com/articles/turning-on-optimizations-in-microchips-xc32/
First you have to download the source of the compiler. Go to http://www.microchip.com/mplab/compilers, click on “Downloads Archive”, scroll down and find “Source Archives”. There you can choose which version to download. At the time of writing the latest link is for xc32-v1.40.
# ⚠ change these variables according to your setup.
installpath="$HOME/microshit" # this is where the compiler will be installed
pic32mxpath='/opt/microchip/xc32/v1.40/pic32mx/' # assuming that you already have installed xc32 from microchip
mkdir -- "$installpath"
export CPPFLAGS="-I$installpath/usr/include"
export LDFLAGS="-L$installpath/usr/lib"
# gmp
mkdir -p gmp_build && cd gmp_build
../gmp/configure "--prefix=$installpath/usr" --disable-shared --enable-static --enable-cxx
make
make install
cd ..
# ppl
mkdir -p ppl_build && cd ppl_build
../ppl/configure "--prefix=$installpath/usr" --disable-shared --enable-static
make
make install
cd ..
Unfortunately I get this error during make:
../../ppl/src/Generator_System.defs.hh:253:7: error: ‘ptrdiff_t’ was not declared in this scope
It seems like it does not compile under newer gcc versions.
This leads me to this page: https://gcc.gnu.org/gcc-4.6/porting_to.html
It says that you should #include <cstddef>
. You have to do that with these files:
Just add #include <cstddef>
and save. Now run *make* again.
Now you'll probably see this error:
../../ppl/src/Interval.defs.hh:451:77: error: ‘f_info’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
Result rl = Boundary_NS::assign(UPPER, upper(), info(), UPPER, x, f_info(x, open));
It looks like it can be solved by using -fpermissive flag.
Try rerunning make like this:
make CXXFLAGS='-g -O2 -frounding-math -W -Wall -fpermissive'
This should probably work.
# cloog
mkdir -p cloog_build && cd cloog_build
../cloog/configure "--prefix=$installpath/usr" --disable-shared --enable-static "--with-ppl=$installpath/usr"
make
make install
cd ..
# libelf
mkdir -p libelf_build && cd libelf_build
../libelf/configure "--prefix=$installpath/usr" --disable-shared
make
make install
cd ..
# zlib
cd zlib
./configure "--prefix=$installpath/usr"
make
make install
cd ..
# binutils
mkdir -p binutils_build && cd binutils_build
../binutils/configure "--prefix=$installpath/usr" --disable-shared --enable-static --target=pic32mx --with-dwarf2
make
make install
cd ..
You will get this error:
../../binutils/bfd/cpu-pic32.c:32:55: fatal error: ../../c30_resource/src/xc32/resource_info.h: No such file or directory
OK this is a real issue. It seems like they forgot to include the file. See this link: http://www.microchip.com/forums/m897811.aspx
# Microchip libraries
cp -a -- "$pic32mxpath" "$installpath/usr/pic32mx"
# gcc
mkdir -p gcc_build && cd gcc_build
../gcc/configure "--prefix=$installpath/usr" --disable-shared --enable-static --target=pic32mx --enable-languages=c,c++,lto --disable-objc-gc --enable-lto --with-host-libstdcxx=-lstdc++ --enable-multilib --with-dwarf2 --disable-sjlj-exceptions "--with-sysroot=$installpath/usr/pic32mx"
make
make install
After all these efforts you end up with a half-broken build.
Just edit the SHA sum in cc1
, cc1plus
and lto1
binaries and you're done. No need to compile anything.
There is a chance that the build process will become easier once Microchip updates their compiler to the latest GCC version. Latest XC compiler version is 1.40 (2015-06-17), which is pretty old. The reason for such delay is probably that they are unable to compile the thing with the newer GCC versions. Ha-ha. Good luck, Microchip.
“Wirth's law is a computing adage which states that software is getting slower more rapidly than hardware becomes faster.”
Just open your eyes and make your code less shitty. Maybe these 5 software frameworks that you smashed into your hello world project is a little bit too much?
In one of my previous posts (2014-09-27 Sand in the Butt) I mentioned my urge to do at least one commit every day. This lasted for quite some time, until the lack of resources actually made me skip one day. And then another one. And then a whole week… Well, take a look yourself:
I am not sure if I liked this experience of committing something every day. Yes, I was very productive during this period, but let's see if anything changes once I stop following this rule.
Somehow I feel that the current education system does more harm than good. I have not checked my sleep graph yet, but I will not be surprised if it was the worst time during the last two years.
Do hard work by marking as many of these cute penguins as you can.
If you are a happy user of a dark GTK theme, then you are probably familiar with this:
That's how it looks like with Boje-Greyscale theme, I am sure that it is pretty bad on other themes as well.
Here is the process I use:
Some software could be installed from marketplace, but for some reason I am not a fan of it.