FBX SDK Linux Install (Centos 7)

I bought a LattePanda to serve as a standard device for testing with the FBX SDK. Since the board is a x86_64 processor with 2GB of memory and 32GB of onboard storage for about a hundred dollars, I think it serves as a representation of the minimum requires for compiling the FBX SDK and hardware that theoretically anyone should be able to get their hands on to recreate these steps.

For an opperating system I’m using Linux and more specifically Centos 7. The reasons for using Linux should hopefully be self-evident to the kind of person reading this (open source). And the distribution used is CentOS 7 mostly because it works, although using the Redhat ecosystem isn’t likely a downside. I wasn’t able to get Debian working, and I’m not familiar with Arch or OpenSuse enough to write instructions.

For prerequisites, we have the CentOS 7 installed on a computer (the latter panda in this case). We have access to the console. And we are logged in as a user with root (sudo) privileges. We will be installing the FBX SDK to the home directory.

Install Prerequisites

$ sudo yum install gcc make gcc-c++ glibc-devel.i686 glibc-devel libuuid-devel libuuid-devel.i686 libstdc++-devel.i686 libstdc++-devel wget

Download and Install SDK (to user’s home directory)

$ cd /home/$USER/
$ wget http://download.autodesk.com/us/fbx/2019/2019.0/fbx20190_fbxsdk_linux.tar.gz
$ tar xvzf fbx20190_fbxsdk_linux.tar.gz
$ rm fbx20190_fbxsdk_linux.tar.gz
$ ./fbx20190_fbxsdk_linux

To install the SDK, you will be asked the path for the directory, the default will be the current (home) directory. You will then be asked to agree to the license agreeement, and if you want to read the read me or not, which you can answer “yes” or “no” accordingly.

The following files should now be inside you home directory:

-rwxr-xr-x.  1 kion kion 74396274 Aug 15  2017 fbx20190_fbxsdk_linux
-rw-rw-r--.  1 kion kion      105 Aug 15  2017 FBX_SDK_Online_Documentation.html
drwxrwxr-x.  3 kion kion       36 Aug 15  2017 include
-rw-rw-r--.  1 kion kion     1407 Aug 15  2017 Install_FbxSdk.txt
drwxrwxrwx.  3 kion kion       17 Mar  5 22:47 lib
-rw-rw-r--.  1 kion kion    96857 Aug 15  2017 License.txt
drwxrwxr-x.  3 kion kion       17 Mar  5 22:44 obj
drwxrwxrwx. 28 kion kion     4096 Aug 15  2017 samples

We need to make a few changes. First we don’t need the installer, so we can remove that. Next we need to rename the “gcc4” folder in the “lib” directory to “gcc”. And then to get the samples to compile, we need to replace the “gcc4” references in the makefiles to “gcc”.

$ rm fbx20190_fbxsdk_linux
$ mv lib/gcc4 lib/gcc
$ find samples -type f -name 'Makefile' | xargs sed -i 's/gcc4/gcc/g'
$ chmod -R 771 lib
$ chmod -R 771 samples

From there the sample programs should be able to complile.

$ cd samples/Animation
$ make
mkdir -p ../../obj/x86/release/Animation
gcc  -m32  -DFBXSDK_SHARED -I../../include -c main.cxx -o main.o
mv main.o ../../obj/x86/release/Animation
mkdir -p ../../obj/x86/release/Animation
gcc  -m32  -DFBXSDK_SHARED -I../../include -c ../Common/Common.cxx -o ../../obj/x86/release/Animation/Common.o
mkdir -p ../../bin/x86/release/Animation
gcc  -m32  -o ../../bin/x86/release/Animation/Animation ../../obj/x86/release/Animation/main.o ../../obj/x86/release/Animation/Common.o -L../../lib/gcc/x86/release -lfbxsdk -lm -lrt -luuid -lstdc++ -lpthread -ldl -Wl,-rpath /home/kion/samples/Animation/../../lib/gcc/x86/release

From there you should be able to run the executable which will be located in the bin folder of the directory which the FBX SDK was installed (in this case the user’s home directory).

$ cd ../../bin/x86/release/Animation
$ ./Animation
Autodesk FBX SDK version 2019.0 Release (b92b15b23)
Program Success!

Joining the Footclan

When it comes to writing user applications for Linux, GTK seems like it should be the obvious choice. In general it’s written in C, and has binding for a lot of languages. And it’s generally a first class citizen in the Linux desktop environment ecosystem as it’s been used to write desktops and applications in Linux. And on top of that it’s getting support for Wayland.

So the next difference is to how to actually get started with GTK. And it seems kind of weird that even though a lot of the more well known applications are written in GTK, there doesn’t seem to be too many resources for how to get started with GTK.

Getting Started with GTK:
https://developer.gnome.org/gtk3/stable/gtk-getting-started.html

Platform Demos (small example applications)
https://developer.gnome.org/gnome-devel-demos/stable/c.html.en

GTK 2 Examples
http://zetcode.com/gui/gtk2/

API Documentaion:
https://developer.gnome.org/gtk3/stable/index.html

The interesting is that while these are available from https://developer.gnome.org, I don’t think if I ever actually found these by looking through their web page.

The Gnome Git repo is located on : https://gitlab.gnome.org/
Looks like anyone can join and start making private repositories.

Linux – FBX SDK Install Debian

I’ve had enough people ask me about FBX support that I figured I should start looking into how to support this file format. Autodesk supplies SDK for converting to and converting from their format here: https://www.autodesk.com/developer-network/platform-technologies/fbx-sdk-2019-0. Specifically it seems like there’s a library for working with C/C++, and then python bindings as well. I’m going to be honest and say that python is probably the better choice to work with, but we’ll start with the C version.

So first step is we download the SDK for linux, run the installer and extract to the local directory.
From there we need to start by trying to build the examples.

$ sudo apt-get install make gcc

Okay and then when we build we get the following error:

kion@server1:~/Gitlab/fbx_c_sdk/samples/Animation$ make
mkdir -p ../../obj/x86/release/Animation
gcc4  -m32  -DFBXSDK_SHARED -I../../include -c main.cxx -o main.o
make: gcc4: Command not found
Makefile:67: recipe for target 'main.o' failed
make: *** [main.o] Error 127

I guess we could try to be lazy and include an alias for gcc4 to gcc in bashrc. Let’s try to edit the makefile to see if that makes it work.

We get another error:

kion@server1:~/Gitlab/fbx_c_sdk/samples/Animation$ make
mkdir -p ../../obj/x86/release/Animation
gcc  -m32  -DFBXSDK_SHARED -I../../include -c main.cxx -o main.o
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
Makefile:67: recipe for target 'main.o' failed
make: *** [main.o] Error 1

Let’s try to apt-get our way out of this

$ sudo apt-get install --reinstall build-essential

Okay, error fixed, next error:

kion@server1:~/Gitlab/fbx_c_sdk/samples/Animation$ make
mkdir -p ../../obj/x86/release/Animation
gcc  -m32  -DFBXSDK_SHARED -I../../include -c main.cxx -o main.o
In file included from /usr/include/c++/6/stdlib.h:36:0,
                 from ../../include/fbxsdk/fbxsdk_def.h:23,
                 from ../../include/fbxsdk.h:43,
                 from main.cxx:29:
/usr/include/c++/6/cstdlib:41:28: fatal error: bits/c++config.h: No such file or directory
 #include 

So next apt-get command attept

sudo apt-get install gcc-multilib g++-multilib

Another quick error in the make file, CC and LD need to be gcc, everything else is generally a path, so it can stay as gcc4 (or you can rename/copy the lib/gcc4 folder).

And now I’m getting the error

kion@server1:~/Gitlab/fbx_c_sdk/samples/Animation$ make
mkdir -p ../../obj/x86/release/Animation
gcc  -m32  -DFBXSDK_SHARED -I../../include -c main.cxx -o main.o
mv main.o ../../obj/x86/release/Animation
mkdir -p ../../obj/x86/release/Animation
gcc  -m32  -DFBXSDK_SHARED -I../../include -c ../Common/Common.cxx -o ../../obj/x86/release/Animation/Common.o
mkdir -p ../../bin/x86/release/Animation
gcc  -m32  -o ../../bin/x86/release/Animation/Animation ../../obj/x86/release/Animation/main.o ../../obj/x86/release/Animation/Common.o -L../../lib/gcc4/x86/release -lfbxsdk -lm -lrt -luuid -lstdc++ -lpthread -ldl -Wl,-rpath /home/kion/Gitlab/fbx_c_sdk/samples/Animation/../../lib/gcc4/x86/release
/usr/bin/ld: cannot find -luuid

So there’s some uuid library, So far tried util-linux, uuid-dev and libuuid1. None of them seem to make it work so far. I think there’s some kind of flag that needs to be passed in for cross compiling uuid. Though I’m running this on an old(er) debian server. So I might try to use a different distribution.

Edit:

CentoS worked!! Here’s the magic yum stuff:

sudo yum install gcc make gcc-c++ glibc-devel.i686 glibc-devel libuuid-devel libuuid-devel.i686

Edit:

Tried adding 32 bit library to Debian. Still no luck, but at least it works on CentOS which is okay for now.

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libuuid1:i386

Edit:

Finally got it working. All it needs after this is

$ sudo apt-get install uuid-dev uuid-dev:i386

And the make file for the samples will run. I should probably create a clean version of the install on Debian.

Tis the season to tinker

Not sure what it is about late December, and early January that makes me want to tinker with tech. Maybe it’s just having a little bit of freetime to want to put something together. So this year I’ve been thinking about how to manage my hardware, and there don’t seem to be too many promising options. Since everything I do in my workload is already covered by the A-series APU mini-itx I put together last year (right before the release of the Ryzen APU’s). The only issue is that I’m using that as a server right now, so I’m going to need to find a replacement server and move everything over if I want to be able to use it as a desktop again. Right now there seems to be some new compelling options in the next year or so, and we should see some more anouncements at CES this year. And I’m really looking to start adopting ARM and RISCV options as they become available over the x86 architexture.

Laptops

I don’t even remember when I bought by Zenbook. I think it’s one of the earlier models, but even with 13.3″ FHD, 4GB of RAM, 128GB of SSD storage, and Intel integrated graphics, there hasn’t been any device compelling enough to replace it (for a reasonable price). As while the CPU’s have gotten faster, and generally come with 8 or 16GB of RAM and atleast 256GB of storage, screen resolutions on laptops seems to be eternally frozen at FHD. If I do buy another laptop, I’d want something like the LG gram 15, which is able to act as a desktop replacement while still being thin and light. The problem is that this class of laptops generally doesn’t exist, and when it does is stupidly expensive. So in terms of laptops, we’ll have to see if anything comes out either with an ARM cpu and Linux (super not likely), or if anything cheap enough comes with a screen 1440p or higher.

Benchmark: HP 15-db0000 Comes with a Ryzen 3 2200U, 4GB of RAM, 1TB 5400RPM HDD, and a 15.4″ Full HD screen for around five hundred dollars. RAM can be upgraded, and the hard drive can probably be swapped out.

Desktop

For desktops the main issue I have is with the mini-itx form factor. The inwin chopin seems to be the smallest case widely available and even that seems like it could be slimmed down a bit. With m.2 form factor ssd’s having slots right on the mother board, it seems like you could make a smaller case with a low profile fan and an APU that would be pretty small. I’m also not happy with the power supply that the Chopin comes with. I’d be really tempted to make a micro-atx ‘sleeper’ build using the Fractal Design Core 1100. Though one difference from not living in the states is that PC parts aren’t very cheap, and it often ends up being a better deal to buy a complete computer.

Benchmark: ThinkCentre M715q Ryzen 3 200GE, 4GB of RAM, 128GB of nvme SSD with two display ports for around four hundred dollars. RAM can be upgraded, and storage can probably be added or swapped out.

Server

While acting as a server shouldn’t be something that has a particulary high requirement, as it’s something that just sits around. At work we have a lot of computers, so it’s pretty easy to forget what role different servers are playing. So the server should have some kind of novalty or be simple to manage. At this point, I think the Node 202 could be the most ‘server-like’ mini-itx case, as it’s a flat case, that holds a normal power supply, has room for storage, and then has room for a pci-express card, if it’s utilized or not. So buying that case could be a possibility. And then that would free up my AMD APU computer, or maybe I could just reinstall Linux on the server that died because of the XFS file system, as I would basically put its corpse inside of there. Either way we have a couple of options, and that would free up my linux box. At home I have a lot of Raspberry Pi’s, so I should probably continue to keep utilizing those to make the most out of what I have, or use my local machine with Gitlab and my cloud server to reduce the use entirely.

Hardware Management

So getting close to moving, and thinking about hardware for my new house. For some reason I can never seem to get it off the brain. I’m pretty happy for work, I think I’ll be using a Fractal Design Core 1100 with a Ryzen 7 cpu, and then some cheap low-profile radeon GPU running Fedora. For home, I’m split between a lot of different options.

For my home, I’m not entirely sure. I have three options. Using a Raspberry Pi (or maybe other SoC), using my little out-dated AMD A-series APU, or maybe upgrade the extra mini-itx motherboard I have lying around. Right now I have RAM, a cpu, a janky motherboard and a janky cpu. The other catch is that the motherboard is lacking features and only has SATA, and wired internet (no wifi built in). So it kind of depends on what kind of internet i go with at my new place, as well as how much I want to spend on my electricity bill if I buy a decent graphics card.

Silverstone SG13
MSI rx580

The other issue is that with a decent computer, I’m also kind of worried about how addicted I will get to minecraft, as right now my play time is greatly reduced by the fact that all I have is a crappy notebook. A better computer might make it more compelling to jump into survival mode if I can actually see what i’m doing.

So I don’t know, I guess I’ll look into getting internet figured out first, by renting a wifi router to get by to start out with and then think about making more plans later, once i’m settled in. And here’s a list of wifi rental: Wifi Rental, so I guess I should pick a day to have it sent to my new house for about a month or so.

More homepage stuff

In terms of using wordpress versus something else for the next update of DashGL, I’m tempted to lean towards “something else”. With wordpress I think I could emulate what I want by maybe adding in a few plugins and just add tutorials via posts, and then manually organize them with pages later. But I don’t think wordpress is a very effective tool for managing tutorials in the format that I want to. So I think the first step is going to be to try and get a working web page layout that I like, and then goto work on making a backend for it.

So in terms of web page templates that I like.

Old Stairwell – I like this one for it’s simplicity. It’s close to the twenty-twelve wordpress theme, but a little more detailed in its execution.

Editorial – Tempted to go with this option, as it has a left sidebar down the complete left side of the page, and then centers the content to the right. I was tempted to do something like this with a fixed left side bar, but the option to scroll isn’t bad. And the general color use and elements mesh together pretty well.

Endearing Green – This is another decent one, though it seems like it works best for a tablet width. Which might actually be a better approach as web pages are difficult with desktops as it’s hard to take advantage of the full with effectively. But for cellphones and tablets, the use of space is pretty set in stone. So I might sketch out a cell phone and table website and then try to figure out what the desktop would look like. Also I’m noticing that the layout is important, but you can get away with a lot if the CSS looks nice.

Keyboard – Or wow, never mind. Looks like there is something close to what I was thinking of. So I can use this as a reference for making my first layout sketch.

Also This – Not a template, but I like the layout.

Keeping Focus

It seems like a long time since I’ve managed to work on anything. In the last couple of days I’ve had some time and I really don’t know what to do with it, so it’s worth writing out what to focus on so I can use my time effectively.

One I should probably add years to my internet hosting. Second I should probably cancel the email plan on my hosting since I’m not using it.
Third, I’ve had the desire to do a lot of stupid projects with hardware, but I guess that’s pretty normal. This time it’s been tempting to look into server cases. I might add more content to the mythical hardware page I set up.

So onto things that matter.

– SDL examples for OpenGL
– SVG exports for MML maps
– New homepage for Dashgl.com
– Map Testing for MML

Also I need to do some testing with Raspberry Pi’s. I wonder if I can set up a VNC and then do recording on my PC, or see if I need some kind of HDMI recording to get that done.