Note: Older versions of libsmbios were tested on GCC 2.96. Libsmbios is no longer actively maintained for this and earlier versions of GCC.
In addition to the tools mentioned in the All Platforms section, for the Linux compile the following tools are recommended (but not required):
The steps to build the library on Linux are as follows:
user@host:~/$ tar xvjf libsmbios-0.1.0.tar.bz2 libsmbios-0.1.0/ libsmbios-0.1.0/Makefile libsmbios-0.1.0/common.mk libsmbios-0.1.0/cppunit/ libsmbios-0.1.0/cppunit/Makefile ...
make noxml-- Compiles only code that has no XML dependencies (same as "default")
make xml-- Compiles all code, must have additional libs installed (xerces) to compile everything
make all-- same as "xml"
make static-- compile statically-linked binaries
make unit_test-- Runs all unit tests Highly recommended
make valgrind-- Checks for memory leaks
make coverage-- produce Automatically generated code coverage report
make header_file_check-- check against Rules for header file inclusion
make tarball-- create a release tarball
If you wish to compile xerces from source, some people have reported problems compiling xerces on Linux. Here are a few things you need to do to compile the xerces tarball to an RPM.
1) Rename the tarball:
$ mkdir build $ cd build/ $ mkdir RPMS SRPMS SPECS BUILD SOURCES $ rpmbuild --define "_topdir $(pwd)" -ta ../xerces-c-current.tar.gz error: File /home/michael_e_brown/xerces-c-src_2_7_0.tar.gz: No such file or directory $ cp ../xerces-c-current.tar.gz SOURCES/xerces-c-src_2_7_0.tar.gz
2) Unpackaged files:
Xerces compilation may fail on newer Red Hat distributions due to "unpackaged files" in their RPM. You can work around this issue by building xercies like this:
$ rpmbuild --define "_topdir $(pwd)" --define "_unpackaged_files_terminate_build 0" -ta SOURCES/xerces-c-src_2_7_0.tar.gz
3) SUSE x64 - The RPM does not compile due to failed validation checks. The current spec file places 64-bit libs in the wrong directory and needs to be patched. A version for SUSE with a fixed SPEC file is available in the libsmbios yum repository. A fix has been submitted upstream. Libsmbios package repository (yum)
4) FC4 - The RPM does not compile due to obsolete spec file syntax. A version for FC4 with a fix for this defect is in the libsmbios yum repository. A fix has been submitted upstream. Libsmbios package repository (yum)