🔗 “.la file not recognized: File format not recognized”
If you’re writing a program using Autotools (Autoconf, Automake, Libtool and friends) and start getting this error message after adding a new library dependency, this means the library in question exports its link flags using Libtool, but your program’s build is not libtoolized yet.
You need to add a call to “libtoolize” to your project. I usually use a script called autogen.sh which calls the various autotools. This is what a typical autogen.sh of mine looks like:
#!/bin/sh -e echo "libtoolize..." libtoolize --copy --ltdl --force echo "aclocal..." aclocal -I aclocal echo "autoconf..." autoconf echo "autoheader..." autoheader echo "automake..." automake --add-missing --copy echo echo "Now run: ./configure --prefix=" echo
Note the call to "libtoolize".
Then, in your configure.ac, add this:
AC_CONFIG_MACRO_DIR([libltdl/m4]) LT_CONFIG_LTDL_DIR([libltdl]) LT_INIT([dlopen]) LTDL_INIT([recursive])
I got this snippet from this bit of the Libtool manual. I usually add it near the top, after AC_PROG_CC and before AC_HEADER_STDC. In the end, add libltdl/Makefile to the AC_CONFIG_FILES rule. Assuming you already have Makefile and src/Makefile, it would look like this:
AC_CONFIG_FILES([Makefile src/Makefile libltdl/Makefile])
Then in your root Makefile.am, add this:
SUBDIRS = libltdl # plus any subdirs you may already have ACLOCAL_AMFLAGS = -I libltdl/m4
and for your executable's rules (suppose it is called foo), add:
AM_CPPFLAGS = $(LTDLINCL) foo_LDADD = $(LIBLTDL) # plus anything else you may already have
And that's it: that's what you need so that .la files can link properly when building your executable. I don't know if that's the optimal way, but it works for me.
🔗 Roland vs. Korg lead sounds
I found two videos of roughly the same lead sound (the “wailing guitar” sound inspired by the Roland JD800) being played in two different keyboards, a Roland Fantom-S and a Korg Trinity. (No, it’s not me playing!)
Regardless of the playing stiyle, notice how the Roland sounds “Kevin Moore”/”Awake” and the Korg sounds “Derek Sherinian”/”Falling Into Infinity”:
Roland:
Korg:
🔗 Link para ouvir Rádio Gaúcha no Linux
(Link atualizado em 3/ago/2011)
Para ouvir a Rádio Gaúcha no Linux, você pode usar o MPlayer ou outro player de sua preferência. Para o MPlayer, use o seguinte comando:
mplayer 'http://gruporbs-gaucha-fm-rs.wm.llnwd.net/gruporbs_Gaucha_FM_RS?channel=232'
Esse link foi obtido seguindo os redirecionamentos a partir do código fonte do próprio site da Gaúcha, que (por falha de design, creio eu) não funciona diretamente no Linux. O site recomenda usar algum “plugin ActiveX para Windows Media Player”, mas como podemos ver isto não é necessário.
🔗 Philosophy, the root of knowledge (in Wikipedia, at least!)
Just read this on XKCD 903:
“Wikipedia trivia: if you take any article, click on the first link in the article text not in parentheses or italics, and then repeat, you will eventually end up at “Philosophy”.
Tried it with a random article, the first one that came up in my Firefox autocompletion:
Brian Stowell → Isle of Man → Crown Dependencies → The Crown → Corporation sole → Legal personality → Entity (almost there! “philosophy” was the second link) → Existence → Sense → Physiology → Science → Knowledge → Fact → Information → Sequence → Mathematics → Quantity
Property (philosophy) → Modern philosophy → Philosophy
Beyond that it’s a loop Philosophy → Reason → Rationality → Philosophy.
Then I tried to pick something as far from philosophy as I could quickly think of:
Neymar → Association football → Team sport → Sport → Organization → Social group → Social sciences → List of academic disciplines → Academia → Community → Extant taxon → Biology → Natural science → Science → … → Philosophy
Turns out Wikipedians have already studied this phenomenon. Apparently, 94.5% of all English Wikipedia articles lead to “Philosophy”. Cool, huh? There is even a fun web app so you can play around with this.
🔗 Como acessar o site do Smiles no Linux com Firefox
Há bastante tempo o site do programa de milhagens Smiles, da Gol, está bugado no Firefox. Em vez de resolver o problema, eles resolveram detectar o browser dos usuários e tentar impedi-los de acessar o site se eles não estiverem usando Internet Explorer. Para nós que usamos Linux, isto não é uma opção. Felizmente, o Firefox é tão flexível que consegue até contornar a incompetência dos programadores do site do Smiles. Aqui vai a receita de como fazer:
Ingredientes
- Firefox 4
- add-on User Agent Switcher
- add-on Nuke Anything Enhanced
Modo de preparo
- No Firefox, siga os links acima e instale os add-ons
- Reinicie o Firefox
- Entre no site do Smiles
- clique na bandeirinha do Brasil se ele entrar em inglês… pra mim ele sempre insiste em inglês, mesmo o meu IP sendo do Brasil!
- No menu do Firefox, Vá em Tools → Default User Agent e selecione alguma versão do Internet Explorer, como “Internet Explorer 8”
- Clique em “Entrar”. Veja como ele é enganado pelo add-on e agora nos permite acessar a tela de login
- Note que não conseguimos clicar em nada da página. Esse é o bug do site do Smiles. Para resolver, vá no menu do botão direito (você pode clicar em qualquer lugar da janela) e selecione a opção “Remove this object”… quatro vezes
- Sim, você precisa remover quatro camadas invisíveis que nos impedem de clicar na interface. Note que depois de fazer isso, a página funciona normalmente!
- Entre seu número Smiles e a senha normalmente, e clique em OK
- Você está logado! Mas note que o problema das quatro camadas invisíveis existe em todas as páginas!
- Clique em “Emissão de bilhete on-line”. O bloqueador de pop-ups vai avisar que impediu um pop-up. Clique em “Preferences…” e libere os pop-ups de “smiles.com.br”.
- Paciência, você está quase lá. Faça a dança dos quatro “Remove this object” e clique em “Emissão de bilhete on-line” de novo. Agora o pop-up abre.
- Ta-da!!! O pop-up é baseado no sistema de passagens normal da Gol, que funciona no Firefox! Você está livre do site bugado do Smiles. A partir daqui é como comprar passagens normalmente no site da Gol.
Follow
🐘 Mastodon ▪ RSS (English), RSS (português), RSS (todos / all)
Last 10 entries
- Aniversário do Hisham 2025
- The aesthetics of color palettes
- Western civilization
- Why I no longer say "conservative" when I mean "cautious"
- Sorting "git branch" with most recent branches last
- Frustrating Software
- What every programmer should know about what every programmer should know
- A degradação da web em tempos de IA não é acidental
- There are two very different things called "package managers"
- Last day at Kong