- Download from http://developers.facebook.com/fbopen/
- Wait for the download to complete.
- Wait some more.
- Extract the archive. Note the implicit dependency of a unixish system.
- Find some PHP code, and SQL dump, and the frighteningly huge (29M) "libfbml.tar.gz"
- Read the README
- Set up a webserver with PHP, and try running some of the provided code.
- Set up a web server with PHP 5
- Set up a MySQL instance. No, this code will not work with another database.
- Try loading the data.
- Edit the data dump to be backwards compatible.
- Grep through the provided PHP for any instances of "FBOPEN:SETUP". Follow the instructions at each step, including hard-coding the database IP address and authentication parameters.
- Debug authentication issues. Store the password for the fbopen-specific account using OLD_PASSWORD instead of PASSWORD.
- At this point, PHP code can run, connect to the database, and fail because functions are missing - presumably these functions are provided by the mysterious libFBML
- Extract libfbml.tar.gz. Find another README.
- "The libfbml package depends on firefox-2.0.0.4, which itself requires that several open source packages be installed. firefox-2.0.0.4-source.tar.bz2 is included with this release and resides in the dependencies subdirectory. Please note that firefox-2.0.0.4 relies on the below products".
- This explains the large download. Take a shot.
- Download the dependencies (in each case, get the EXACT version stated in the README):
- glib-2.14.6
- pkg-config-0.20
- atk-1.9.1
- freetype-2.3.4
- fontconfig-2.3.97
- libpng-1.2.25
- cairo-1.2.6
- tiff-3.7.4
- pango-1.18.4
- gtk+-2.10.13
- libIDL-0.8.8
- libXft-2.1.12
- xproto-7.0.7
- xrender-0.8.3
- build-all.py claims to be a script that will build and install everything. Read the script to see what it will do, because it WILL hork my machine (Advice to anybody reproducing my pain = do this on a readily disposable and replaceable OS install, right?).
- Note that each part of the script that requires escalated privileges is wrapped in sudo. Make sure it doesn't do anything malicious or stupid.
- With all of the dependency tarballs downloaded into the dependencies folder, launch build-all.py. Each time it fails, take a shot.
- Fiddle with PATH and LD_LIBRARY_PATH until the first build works.
- Firewall blocks ftp by returning an HTML error page, half the packages were be broken, starting with atk. Redownload from http URLs. Take a shot.
- fontconfig uses macros that are not recognized by some versions of gcc. After researching the meaning and intent of these macros, delete them. Since build-all.py has no concept of "continue", comment all successfully installed packages out of the "packages" list.
- The build for cairo was unable to find some of the system packages. Manually set the PKG_CONFIG_PATH environment variable.
- Start the build again. Watch for 15 minutes. Go home.
- The build for xrender cannot find "render" in package-config. Find a "render" development package for your linux system that includes the file render.pc
- Now that build-all.py has finished with the dependencies of the big-stupid dependency of libfbml, it will compile Firefox. This will take a while, but eventually fails with references to "XFreePixmap", "Xfree", "XCreatePixmap", etc.
- Hack the Firefox Makefiles to correctly load Xrender. Of course, the sed snippet was broken by the MLM, but the intent is decipherable.
- Get lunch.
- Compilation error in libFBML - the bastards are using goto - and using it wrong!
- Refactor the Facebook code to not use goto
- Comment out everything in build-all.py that would rebuild firefox or dependencies. Try again.
- WTF? "namespace-scope anonymous aggregates must be static". What does that mean? Is that even english?
- Make fbjs.h the first include from fbml.cpp. Cross fingers, take a shot, and try again.
- "phpize" is missing. Install php-devel for PHP5.
- Can't locate object method "path" via package "Autom4te::Request" at /usr/bin/autom4te line 81.
- rm -rf ext/autom4te.cache. These geniuses left garbage in the build directory.
- Yay! build-all.py finally worked!
- restart apache
- Crap. Needs still more PHP modules.
- Install Apache headers and development tools.
- Rebuild PHP5 from source, with all modules.
- Rebuild PHP5 from source, with all modules except sqlite.
- Recompile libfbml with the new rebuilt PHP
- Sacrifice a small animal to the Ogdru Jahad and their 369 incomprehensibly foul children.
- Restart apache.
- It worked! Have a beer.
18 comments | Leave a comment