Problems with Open-Source Downloads read and

Creating custom postgres types using QT 5.0.1 and Postgres 9.2 with MacOSX10.6.sdk

  • ** If this message is not in the right forum please direct me accordingly **

    With postgres 9.2 it is now possible to use 'CREATE EXTENSION' to install custom postgres types.

    I can successfully build and install a C++ custom type with g++; but I am running into issues creating an .so built by qt 5.0.1 (this so contains the C++ object(s) and extern "C" interface to same).

    Apparently Postgres still expects a 32 bit dll/so. This is somewhat problematic since, from everything I can tell, there is no way to successfully build a 32 bit version of qt 5.0.1 on a mac. I have tried without success to compile the qt source with macx-g++-32, macx-clang++-32 ( with no success.

    Am I missing something obvious (like using -arch i386, in some specific way)? Or is this something that i need to do in Linux?

    The error message I get:

    ld: warning: ignoring file .lib/libReasonerModule.dylib, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): .lib/libReasonerModule.dylib

    Snippets from make log (If it would help...):

    gcc -isysroot /Applications/ -mmacosx-version-min=10.6 -headerpad_max_install_names -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -I/Applications/ -I/usr/include/libxml2 -I /Enterprise/9.2/include -I. -I. -I/Library/PostgreSQL/9.2/include/postgresql/server -I/Library/PostgreSQL/9.2/include/postgresql/internal -I/usr/local/include/libxml2 -I/usr/local/include/libxml2 -I/usr/local/include -c -o core_reasoner_module.o core_reasoner_module.c

    gcc -isysroot /Applications/ -mmacosx-version-min=10.6 -headerpad_max_install_names -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -I/Applications/ -I/usr/include/libxml2 -I /Enterprise/9.2/include -I. -I. -I/Library/PostgreSQL/9.2/include/postgresql/server -I/Library/PostgreSQL/9.2/include/postgresql/internal -I/usr/local/include/libxml2 -I/usr/local/include/libxml2 -I/usr/local/include -c -o core_reasoner_inout.o core_reasoner_inout.c

    gcc -isysroot /Applications/ -mmacosx-version-min=10.6 -headerpad_max_install_names -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -bundle -multiply_defined suppress -o core_reasoner_module.o core_reasoner_inout.o -L/Library/PostgreSQL/9.2/lib -L/usr/local/lib -L/usr/local/lib -Wl,-dead_strip_dylibs -L/Applications/ -lxml2 -lz -L.lib -lReasonerModule -bundle_loader /Library/PostgreSQL/9.2/bin/postgres

    Thanks in advance,

  • Lifetime Qt Champion


    It's look like libReasonerModule is only x86_64. If it's a lib of yours, you have to add CONFIG+=x86 to build it for 32bit

    Hope it helps

  • I appreciate the response -- I apologize for not actually checking back after I posted.

  • Lifetime Qt Champion

    No worries, did you make it work ?

Log in to reply