2009-03-10 07:36:21     Qt static build

Document created by Aaronwu Employee on Aug 14, 2013
Version 1Show Document
  • View in full screen mode

2009-03-10 07:36:21     Qt static build

Nikolay Chokoev (IRELAND)

Message: 70690   

 

I would like to static Qt linking for my Qt app.

 

To compile Qt as a static library, I have to use the "-static" option when running configure:

 

./configure -static

 

Looking at the 'Makefile' in '/lib/qt-embedded', it depends on "CONFIGURE_SHARED_ENABLE", which is set in 'config.arch' file, and is dependant of "CONFIG_FMT_USE_FDPIC_ELF".

 

When I configure to use 'FLAT' instead 'FDPC', the tslib cannot be built.

 

Is it possible to build only Qt as '-static'? How can I workaround this?

QuoteReplyEditDelete

 

 

2009-03-10 07:54:40     Re: Qt static build

Mike Frysinger (UNITED STATES)

Message: 70691   

 

-static works just fine with FDPIC.  use it when linking your application against QT.

QuoteReplyEditDelete

 

 

2009-03-10 08:05:16     Re: Qt static build

Nikolay Chokoev (IRELAND)

Message: 70692   

 

Do I have to build Qt library with '-static' before, or just linking my app with '-static' is enough?

QuoteReplyEditDelete

 

 

2009-03-10 09:46:37     Re: Qt static build

Nikolay Chokoev (IRELAND)

Message: 70697   

 

Hi Mike,

 

I tried just to link my app with 'static' ageinst Qt, but I get an error - cannot find -lQtGui in stages/usr/lib

 

then I tried to build Qt with -static. I've changed qt-embedded/Makefile:

 

CONF_XPLATFORM  = qws/linux-bfin-fdpic-g++

CONF_SHARED_OPT = -static

 

The Qt was built, by when I try to build my app, I've got:

 

bfin-linux-uclibc-g++ -static -o adiembdemo main.o mainwindow.o iconwdgt.o calculator.o button.o list.o config.o draw.o pickboardpicks.o pickboardcfg.o keyboardframe.o keyboard.o image.o dynres.o plot.o qabstractanimation.o qanimation.o qanimationgroup.o qconnectionstate_p.o qpropertystate_p.o qstate.o qstategroup.o qtransition.o qeasingcurve.o moc_mainwindow.o moc_iconwdgt.o moc_button.o moc_calculator.o moc_list.o moc_pickboardcfg.o moc_keyboardframe.o moc_pickboardpicks.o moc_keyboard.o moc_dynres.o moc_plot.o    -Wl,-rpath-link,/usr/dlnx764/svn/uclinux-dist/staging/usr/lib -L/usr/dlnx764/svn/uclinux-dist/staging/usr/lib -lQtGui -lQtNetwork -lQtCore -lpthread

/usr/dlnx764/svn/uclinux-dist/staging/usr/lib/libQtGui.a(qmousetslib_qws.o): In function `QWSTslibMouseHandlerPrivate::close()':

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/embedded/qmousetslib_qws.cpp:(.text+0xd6): undefined reference to `_ts_close'

/usr/dlnx764/svn/uclinux-dist/staging/usr/lib/libQtGui.a(qmousetslib_qws.o): In function `QWSTslibMouseHandlerPrivate::open()':

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/embedded/qmousetslib_qws.cpp:(.text+0xfe): undefined reference to `_ts_open'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/embedded/qmousetslib_qws.cpp:(.text+0x11e): undefined reference to `_ts_config'

/usr/dlnx764/svn/uclinux-dist/staging/usr/lib/libQtGui.a(qmousetslib_qws.o): In function `QWSTslibMouseHandlerPrivate::readMouseData()':

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/embedded/qmousetslib_qws.cpp:(.text+0x2b6): undefined reference to `_ts_read_raw'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/embedded/qmousetslib_qws.cpp:(.text+0x2e0): undefined reference to `_ts_read_raw'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/embedded/qmousetslib_qws.cpp:(.text+0x314): undefined reference to `_ts_read'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/embedded/qmousetslib_qws.cpp:(.text+0x46a): undefined reference to `_ts_read'

/usr/dlnx764/svn/uclinux-dist/staging/usr/lib/libQtGui.a(qmousetslib_qws.o): In function `QWSTslibMouseHandlerPrivate::QWSTslibMouseHandlerPrivate(QWSTslibMouseHandler*, QString const&)':

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/embedded/qmousetslib_qws.cpp:(.text+0x572): undefined reference to `_ts_fd'

/usr/dlnx764/svn/uclinux-dist/staging/usr/lib/libQtGui.a(qmousetslib_qws.o): In function `QWSTslibMouseHandlerPrivate::QWSTslibMouseHandlerPrivate(QWSTslibMouseHandler*, QString const&)':

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/embedded/qmousetslib_qws.cpp:(.text+0x86a): undefined reference to `_ts_fd'

/usr/dlnx764/svn/uclinux-dist/staging/usr/lib/libQtGui.a(qpnghandler.o): In function `_qpiw_write_fn':

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x11c): undefined reference to `_png_get_io_ptr'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x146): undefined reference to `_png_error'

/usr/dlnx764/svn/uclinux-dist/staging/usr/lib/libQtGui.a(qpnghandler.o): In function `setup_qt(QImage&, png_struct_def*, png_info_struct*, float)':

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x19c): undefined reference to `_png_get_IHDR'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x1c2): undefined reference to `_png_read_update_info'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x262): undefined reference to `_png_get_valid'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x292): undefined reference to `_png_set_expand'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x2ee): undefined reference to `_png_read_update_info'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x2f6): undefined reference to `_png_set_bgr'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x30a): undefined reference to `_png_get_valid'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x31c): undefined reference to `_png_get_gAMA'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x340): undefined reference to `_png_set_gamma'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x354): undefined reference to `_png_set_packing'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x372): undefined reference to `_png_get_valid'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x386): undefined reference to `_png_set_filler'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x394): undefined reference to `_png_get_valid'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x3b2): undefined reference to `_png_set_packing'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x3bc): undefined reference to `_png_read_update_info'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x3d4): undefined reference to `_png_get_IHDR'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x43a): undefined reference to `_png_get_valid'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x504): undefined reference to `_png_set_gray_to_rgb'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x510): undefined reference to `_png_set_strip_16'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x51e): undefined reference to `_png_get_valid'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x532): undefined reference to `_png_set_strip_16'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x53c): undefined reference to `_png_set_expand'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x544): undefined reference to `_png_set_strip_16'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x54c): undefined reference to `_png_set_gray_to_rgb'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x592): undefined reference to `_png_set_invert_mono'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x59c): undefined reference to `_png_read_update_info'

/usr/dlnx764/svn/uclinux-dist/staging/usr/lib/libQtGui.a(qpnghandler.o): In function `_iod_read_fn':

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x690): undefined reference to `_png_get_io_ptr'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x6ca): undefined reference to `_png_error'

/usr/dlnx764/svn/uclinux-dist/staging/usr/lib/libQtGui.a(qpnghandler.o): In function `QPngHandler::~QPngHandler()':

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x9c0): undefined reference to `_png_destroy_read_struct'

/usr/dlnx764/svn/uclinux-dist/staging/usr/lib/libQtGui.a(qpnghandler.o): In function `set_text(QImage const&, png_struct_def*, png_info_struct*, QString const&)':

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0xfc2): undefined reference to `_png_set_text'

/usr/dlnx764/svn/uclinux-dist/staging/usr/lib/libQtGui.a(qpnghandler.o): In function `QPNGImageWriter::writeImage(QImage const&, int, QString const&, int, int)':

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x12aa): undefined reference to `_png_create_write_struct'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x12ca): undefined reference to `_png_set_error_fn'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x12d2): undefined reference to `_png_create_info_struct'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x12fe): undefined reference to `_png_set_compression_level'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x1326): undefined reference to `_png_set_write_fn'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x13a4): undefined reference to `_png_set_IHDR'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x1400): undefined reference to `_png_set_bgr'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x141e): undefined reference to `_png_set_sig_bytes'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x145a): undefined reference to `_png_set_pHYs'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x147a): undefined reference to `_png_write_info'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x148e): undefined reference to `_png_set_packing'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x1538): undefined reference to `_png_write_chunk'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x1560): undefined reference to `_png_get_IHDR'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x15ac): undefined reference to `_png_write_image'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x15c2): undefined reference to `_png_write_end'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x15f0): undefined reference to `_png_destroy_write_struct'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x1636): undefined reference to `_png_set_gAMA'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x1650): undefined reference to `_png_set_oFFs'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x165e): undefined reference to `_png_destroy_write_struct'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x1688): undefined reference to `_png_set_PLTE'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x1722): undefined reference to `_png_destroy_write_struct'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x17b0): undefined reference to `_png_set_tRNS'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x17c2): undefined reference to `_png_set_packswap'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x182e): undefined reference to `_png_write_chunk'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x1858): undefined reference to `_png_set_filler'

/usr/dlnx764/svn/uclinux-dist/staging/usr/lib/libQtGui.a(qpnghandler.o): In function `QPngHandlerPrivate::readPngHeader()':

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x19f4): undefined reference to `_png_create_read_struct'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x1a10): undefined reference to `_png_set_error_fn'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x1a1a): undefined reference to `_png_create_info_struct'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x1a2e): undefined reference to `_png_create_info_struct'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x1a64): undefined reference to `_png_set_read_fn'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x1a70): undefined reference to `_png_read_info'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x1a86): undefined reference to `_png_get_text'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x1c68): undefined reference to `_png_destroy_read_struct'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x1c8e): undefined reference to `_png_destroy_read_struct'

/usr/dlnx764/svn/uclinux-dist/staging/usr/lib/libQtGui.a(qpnghandler.o): In function `QPngHandlerPrivate::readPngImage(QImage*)':

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x1eec): undefined reference to `_png_destroy_read_struct'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x1f50): undefined reference to `_png_get_IHDR'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x1fa0): undefined reference to `_png_read_image'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x1fac): undefined reference to `_png_get_x_pixels_per_meter'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x1fc6): undefined reference to `_png_get_y_pixels_per_meter'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x1fec): undefined reference to `_png_get_text'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x204a): undefined reference to `_png_destroy_read_struct'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x2264): undefined reference to `_png_read_end'

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x2276): undefined reference to `_png_destroy_read_struct'

/usr/dlnx764/svn/uclinux-dist/staging/usr/lib/libQtGui.a(qpnghandler.o): In function `QPngHandler::~QPngHandler()':

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x2460): undefined reference to `_png_destroy_read_struct'

/usr/dlnx764/svn/uclinux-dist/staging/usr/lib/libQtGui.a(qpnghandler.o): In function `QPngHandler::~QPngHandler()':

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/image/qpnghandler.cpp:(.text+0x24d4): undefined reference to `_png_destroy_read_struct'

/usr/dlnx764/svn/uclinux-dist/staging/usr/lib/libQtGui.a(qprintengine_pdf.o): In function `QPdfEnginePrivate::writeCompressed(char const*, int)':

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/gui/painting/qprintengine_pdf.cpp:(.text+0x64): undefined reference to `_compress'

/usr/dlnx764/svn/uclinux-dist/staging/usr/lib/libQtCore.a(qbytearray.o): In function `qUncompress(unsigned char const*, int)':

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/corelib/tools/qbytearray.cpp:(.text+0x2604): undefined reference to `_uncompress'

/usr/dlnx764/svn/uclinux-dist/staging/usr/lib/libQtCore.a(qbytearray.o): In function `qCompress(unsigned char const*, int, int)':

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/corelib/tools/qbytearray.cpp:(.text+0x2804): undefined reference to `_compress2'

/usr/dlnx764/svn/uclinux-dist/staging/usr/lib/libQtCore.a(qlibrary_unix.o): In function `qdlerror()':

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/corelib/plugin/qlibrary_unix.cpp:(.text+0xc): undefined reference to `_dlerror'

/usr/dlnx764/svn/uclinux-dist/staging/usr/lib/libQtCore.a(qlibrary_unix.o): In function `QLibraryPrivate::resolve_sys(char const*)':

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/corelib/plugin/qlibrary_unix.cpp:(.text+0x50): undefined reference to `_dlsym'

/usr/dlnx764/svn/uclinux-dist/staging/usr/lib/libQtCore.a(qlibrary_unix.o): In function `QLibraryPrivate::unload_sys()':

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/corelib/plugin/qlibrary_unix.cpp:(.text+0x2aa): undefined reference to `_dlclose'

/usr/dlnx764/svn/uclinux-dist/staging/usr/lib/libQtCore.a(qlibrary_unix.o): In function `QLibraryPrivate::load_sys()':

/usr/dlnx764/svn/uclinux-dist/lib/qt-embedded/qt-embedded-linux-opensource-src-4.4.3/src/corelib/plugin/qlibrary_unix.cpp:(.text+0x706): undefined reference to `_dlopen'

collect2: ld returned 1 exit status

make[3]: *** [adiembdemo] Error 1

make[3]: Leaving directory `/usr/dlnx764/svn/uclinux-dist/user/adievmdemo/adianimevmdemo/adiembdemo'

make[2]: *** [all] Error 2

make[2]: Leaving directory `/usr/dlnx764/svn/uclinux-dist/user/adievmdemo'

make[1]: *** [adievmdemo/_only] Error 2

make[1]: Leaving directory `/usr/dlnx764/svn/uclinux-dist/user'

make: *** [user/adievmdemo/_only] Error 2

 

What I do wrong here?

QuoteReplyEditDelete

 

 

2009-03-10 15:07:31     Re: Qt static build

Mike Frysinger (UNITED STATES)

Message: 70714   

 

you need to specify all libraries, even ones QT uses

 

QuoteReplyEditDelete

 

 

2009-03-11 10:50:43     Re: Qt static build

Nikolay Chokoev (IRELAND)

Message: 70778   

 

Thanks Mike!

 

I needed to build tslib with --enable-static to produce static library and to link my app against it.

 

Now I can  build my app., but when I run it I have:

 

...

Loading module /usr/lib/ts//pthres.so

: can't resolve symbol '_tslib_parse_vars'

 

 

QuoteReplyEditDelete

 

 

2009-03-11 10:55:58     Re: Qt static build

Mike Frysinger (UNITED STATES)

Message: 70779   

 

dont link tslib statically

QuoteReplyEditDelete

 

 

2009-03-11 11:25:21     Re: Qt static build

Nikolay Chokoev (IRELAND)

Message: 70780   

 

then I have previous error with '_ts_*' related messages...

QuoteReplyEditDelete

 

 

2009-03-11 11:44:41     Re: Qt static build

Mike Frysinger (UNITED STATES)

Message: 70782   

 

you can setup the link so you only statically link some libraries

 

...... -Wl,-Bstatic -lqt -Wl,-Bdynamic -lts -lpng -lz ......

QuoteReplyEditDelete

 

 

2009-03-11 13:30:31     Re: Qt static build

Nikolay Chokoev (IRELAND)

Message: 70788   

 

now it's linked fine, but when I run it I have:

 

root:/usr/bin> ./myqtapp  -qws

./myqtapp: not found

 

Can you suggest me, plese, how to debug that? I guess the tslib.so library was not found...but...

QuoteReplyEditDelete

 

 

2009-03-11 13:55:22     Re: Qt static build

Mike Frysinger (UNITED STATES)

Message: 70790   

 

that suggests you dont actually have the FDPIC ELF libs installed in /lib/

QuoteReplyEditDelete

 

 

2009-03-11 15:21:43     Re: Qt static build

Nikolay Chokoev (IRELAND)

Message: 70796   

 

As I've linked the app dynamicaly only against tslib, I suppose I have to have tslib shared library installed in the lib folder. I have one libts...so.0 file there. How can I verify if it is FDPIC ELF? Is there any other FDPIC ELF library I have to have there?

QuoteReplyEditDelete

 

 

2009-03-11 18:38:31     Re: Qt static build

Mike Frysinger (UNITED STATES)

Message: 70799   

 

FDPIC ELF is the only thing tslib can be, and really the only shared libs (*.so) you'll see

 

however, i was talking about the shared libraries from uClibc itself

QuoteReplyEditDelete

 

 

2009-03-12 04:48:22     Re: Qt static build

Nikolay Chokoev (IRELAND)

Message: 70835   

 

in /lib/ I have:

 

root:/lib> ls

ld-uClibc-0.9.29.so     libm.so.0               librt.so.0

ld-uClibc.so.0          libmudflap.so.0         libstdc++.so.6

libc.so.0               libmudflap.so.0.0.0     libstdc++.so.6.0.8

libcrypt-0.9.29.so      libmudflapth.so.0       libthread_db-0.9.29.so

libcrypt.so.0           libmudflapth.so.0.0.0   libthread_db.so.1

libdl-0.9.29.so         libnsl-0.9.29.so        libuClibc-0.9.29.so

libdl.so.0              libnsl.so.0             libutil-0.9.29.so

libgcc_s.so.1           libpthread-0.9.29.so    libutil.so.0

libgfortran.so.1        libpthread.so.0         libz.so.1

libgfortran.so.1.0.0    libresolv-0.9.29.so     modules

libjpeg.so.62           libresolv.so.0

libm-0.9.29.so          librt-0.9.29.so

 

Is that what I need to have?

QuoteReplyEditDelete

 

 

2009-03-12 07:44:06     Re: Qt static build

Nikolay Chokoev (IRELAND)

Message: 70852   

 

Is there any tool available I can debug what in fact happened?

QuoteReplyEditDelete

 

 

2009-03-12 08:19:01     Re: Qt static build

Mike Frysinger (UNITED STATES)

Message: 70856   

 

no

 

make sure you are not using the -static flag.  only link specific libs statically using the -Bstatic/-Bdynamic thing i mentioned earlier.

QuoteReplyEditDelete

 

 

2009-03-12 09:22:50     Re: Qt static build

Nikolay Chokoev (IRELAND)

Message: 70859   

 

Yes, I was using '-static-. Now I removed it, but other error appears:

 

/opt/uClinux/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/../../../../bfin-linux-uclibc/bin/ld: cannot find -lgcc_s

 

...the qt_embedded/Makefile is still with:

 

CONF_XPLATFORM  = qws/linux-bfin-fdpic-g++

CONF_SHARED_OPT = -static

QuoteReplyEditDelete

 

 

2009-03-12 09:27:57     Re: Qt static build

Mike Frysinger (UNITED STATES)

Message: 70861   

 

what the qt embedded dir does doesnt matter

 

post the full command line you're using to link your application

QuoteReplyEditDelete

 

 

2009-03-12 09:36:51     Re: Qt static build

Nikolay Chokoev (IRELAND)

Message: 70863   

 

... actually I'm using .pro project file and qmake to make the Makefile. Then in Makefile I add -Wl,-Bstatic,libs in line:

 

LIBS  = $(SUBLIBS)  -Wl,-rpath-link,/usr/dlnx764/svn/uclinux-dist/staging/usr/lib -L/usr/dlnx764/svn/uclinux-dist/staging/usr/lib -lQtGui -lQtNetwork -lQtCore -lpthread

 

The line above is automatically produced by the qmake. I just add -Bstatic/-Bdynamic in this line. If you need I can upload Makefile ... and other files...

QuoteReplyEditDelete

 

 

2009-03-12 09:41:13     Re: Qt static build

Mike Frysinger (UNITED STATES)

Message: 70864   

 

you could also try moving the shared QT libs into a diff place so that all the .a libs get forced.  then you shouldnt need the -B stuff ...

QuoteReplyEditDelete

 

 

2009-03-12 10:38:55     Re: Qt static build

Nikolay Chokoev (IRELAND)

Message: 70868   

 

temporary solved this problem as linking with Wl,-Bdynamic,-lgcc_s.

 

Now the app is built and when I run it on the target I have an exception:

 

root:/usr/bin> ./portedcanvas -qws

NULL pointer access

Deferred Exception context

CURRENT PROCESS:

COMM=portedcanvas PID=280

CPU = 0

TEXT = 0x01000000-0x01726fb0        DATA = 0x02600fb0-0x0272af38

BSS = 0x0272af38-0x00240000  USER-STACK = 0x0025fe70

 

return address: [0x025e18bc]; contents of:

0x025e1890:  6fe3  2ff2  6000  3299  0010  0000  014b  3200

0x025e18a0:  3219  3212  0e3a  1818  3401  56c1  4ff3  0300

0x025e18b0:  1015  44d1  6ff9  601b  549a  3212 [9c01] e0a2

0x025e18c0:  1002  c803  1800  9201  9c01  9201  0c42  3298

 

SEQUENCER STATUS:               Not tainted

SEQSTAT: 00060027  IPEND: 0030  SYSCFG: 0006

  EXCAUSE   : 0x27

  interrupts disabled

  physical IVG5 asserted : <0xffa00b04> { _evt_ivhw + 0x0 }

RETE: <0x00000000> { _do_one_initcall + 0xfffff000 }

RETN: <0x0026c000> [ /lib/libdl-0.9.29.so + 0x0 ]

RETX: <0x00000480> /* Maybe fixed code section */

RETS: <0x025f6902> [ /lib/libuClibc-0.9.29.so + 0x36902 ]

PC  : <0x025e18bc> [ /lib/libuClibc-0.9.29.so + 0x218bc ]

DCPLB_FAULT_ADDR: <0x00000000> { _do_one_initcall + 0xfffff000 }

ICPLB_FAULT_ADDR: <0x025e18bc> [ /lib/libuClibc-0.9.29.so + 0x218bc ]

 

PROCESSOR STATE:

R0 : 018e3cd8    R1 : 00000000    R2 : 00000000    R3 : 00000003

R4 : 018fef78    R5 : 018ff250    R6 : 018fef44    R7 : 018e0fe8

P0 : 018e3cd8    P1 : 0000002d    P2 : 00000000    P3 : 00000000

P4 : 00000006    P5 : 018e7628    FP : 0025f9b4    SP : 0026bf24

LB0: 019a6181    LT0: 019a6174    LC0: 00000000

LB1: 019a4ec5    LT1: 019a4ec4    LC1: 00000000

B0 : 00000000    L0 : 00000000    M0 : 00000000    I0 : 00000000

B1 : 00000000    L1 : 00000000    M1 : 00000000    I1 : 018e7028

B2 : 00000000    L2 : 00000000    M2 : 00000000    I2 : 00000000

B3 : 00000000    L3 : 00000000    M3 : 00000000    I3 : 00000000

A0.w: 00000000   A0.x: 00000000   A1.w: 00000000   A1.x: 00000000

USP : 0025f9a4  ASTAT: 02002021

 

Hardware Trace:

   0 Target : <0x00004b6c> { _trap_c + 0x0 }

     Source : <0xffa005c2> { _exception_to_level5 + 0x9e } CALL pcrel

   1 Target : <0xffa00524> { _exception_to_level5 + 0x0 }

     Source : <0xffa003f6> { _bfin_return_from_exception + 0x6 } RTX

   2 Target : <0xffa003f0> { _bfin_return_from_exception + 0x0 }

     Source : <0xffa0047e> { _ex_trap_c + 0x66 } JUMP.S

   3 Target : <0xffa00418> { _ex_trap_c + 0x0 }

     Source : <0xffa0064e> { _trap + 0x2a } JUMP (P4)

   4 Target : <0xffa00624> { _trap + 0x0 }

     Source : <0x025e18ba> [ /lib/libuClibc-0.9.29.so + 0x218ba ] 0x3212

   5 Target : <0x025e189c> [ /lib/libuClibc-0.9.29.so + 0x2189c ]

     Source : <0x025f68fe> [ /lib/libuClibc-0.9.29.so + 0x368fe ] CALL pcrel

   6 Target : <0x025f68ec> [ /lib/libuClibc-0.9.29.so + 0x368ec ]

     Source : <0x019a615e> [ /lib/ld-uClibc-0.9.29.so + 0x615e ] JUMP (P1)

   7 Target : <0x019a614c> [ /lib/ld-uClibc-0.9.29.so + 0x614c ]

     Source : <0x019a6072> [ /lib/ld-uClibc-0.9.29.so + 0x6072 ] RTS

   8 Target : <0x019a6066> [ /lib/ld-uClibc-0.9.29.so + 0x6066 ]

     Source : <0x019a602e> [ /lib/ld-uClibc-0.9.29.so + 0x602e ] IF !CC JUMP

   9 Target : <0x019a601a> [ /lib/ld-uClibc-0.9.29.so + 0x601a ]

     Source : <0x019a3e1e> [ /lib/ld-uClibc-0.9.29.so + 0x3e1e ] RTS

  10 Target : <0x019a3e10> [ /lib/ld-uClibc-0.9.29.so + 0x3e10 ]

     Source : <0x019a4110> [ /lib/ld-uClibc-0.9.29.so + 0x4110 ] JUMP.S

  11 Target : <0x019a410e> [ /lib/ld-uClibc-0.9.29.so + 0x410e ]

     Source : <0x019a3ddc> [ /lib/ld-uClibc-0.9.29.so + 0x3ddc ] IF !CC JUMP

  12 Target : <0x019a3d9a> [ /lib/ld-uClibc-0.9.29.so + 0x3d9a ]

     Source : <0x019a13e2> [ /lib/ld-uClibc-0.9.29.so + 0x13e2 ] RTS

  13 Target : <0x019a13dc> [ /lib/ld-uClibc-0.9.29.so + 0x13dc ]

     Source : <0x019a141c> [ /lib/ld-uClibc-0.9.29.so + 0x141c ] IF CC JUMP

  14 Target : <0x019a141a> [ /lib/ld-uClibc-0.9.29.so + 0x141a ]

     Source : <0x019a142c> [ /lib/ld-uClibc-0.9.29.so + 0x142c ] JUMP.S

  15 Target : <0x019a1428> [ /lib/ld-uClibc-0.9.29.so + 0x1428 ]

     Source : <0x019a1410> [ /lib/ld-uClibc-0.9.29.so + 0x1410 ] IF !CC JUMP

Userspace Stack

Stack info:

SP: [0x0025f9a4] <0x0025f9a4> [ portedcanvas + 0x1f9a4 ]

FP: (0x0025fe7c)

Memory from 0x0025f9a0 to 00260000

0025f9a0: 018e7628 [018e0fe8] 025f69dc  000369dc  000369dc  0025f9cc <01570792>

0271feb0

0025f9c0: 018e7884  000369dc  000369dc  0025f9e8 <025f6a06> 025f69dc <019a4fc2>

018ff1f8

0025f9e0: 018e7884  018e0fe8  0025fc7c <019a5094> 01000114  019a689c  0025ff40

0271feb0

0025fa00: 018feea8  00000000  0026c770  00000000  018e7628  0189151e  00000000

018e7628

0025fa20: 0033dec6  0025fa30  018e7628  0033deb8  0025fa3c  018e7158 <0033deae>

00000000

0025fa40: 018e74f8  00260757  0025fa54  018e7628  00260749  0025fa60  018e7158 <

0026073e>

0025fa60: 00000000  018e7758  001b148c  00000000  018e7628  01043812  0025fa84

018e7628

0025fa80:<01043808> 0025fa90  018e74f8  010437e5  0025fa9c  018e73c4  010437b5

0025faa8

0025faa0: 018e728c  010437a7  00000000  018e7158  00000000  018e7028  00000000

018fef48

0025fac0: 019a6df4  019a6844  018fef44  018ff1d8  018ff1bc  018ff1f8  018ff254

018ff1cc

0025fae0: 00000000  018ff1fc  018fef40  00000000  0025fa98  019a6df4  019a693c

019a6df4

0025fb00: 019a68bc  018fef44  00000000  00000000  00000000  00000000  0025fdd0

00000000

0025fb20: 018e7000  00000000  00000000  0025ff20  018fef78  0025ff40  00000000

00000000

0025fb40: 00000000  00000000  00000000  00000000  00000000  00000000  00000000

00000000

0025fb60: 00000000  00000000  00000000  00000000  00000000  00000000  00027f36

00000808

0025fb80: 0271feb0  01000128  0101b8dc  01008c5c  00000000  00000000  00000000

00028153

0025fba0: 00000010  00056c48  0058c67c  00000000  00000000  00000000  01045fe0

00010c68

0025fbc0: 00000008  00000011  00000000  00000000  01056440  00000000  00000000

00000000

0025fbe0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000

00000000

0025fc00: 00000000  00000000  00000000  00000000  00000000  00000000  00000000

00000000

0025fc20: 00000001  000000d5  000181ed  00000000  00000000  00007480  00001000

00000040

0025fc40: 000051d7  00000000  49b91a8d  00000000  45984f00  00000000  00000000

00000000

0025fc60: 025f69dc  018e0fe8  00000000  00000000  00000000  00000000  018e7984

0025fe30

0025fc80:<019a589a> 0025ff20  000005b0  00000002  00000002  00000512  018fef78

0025fccc

0025fca0: 0025ff20  018fef78  0025fdb8  0025fe80  0025fe74  0025ff40  018fef78

0025ff20

0025fcc0: 018fef78  0025fe74  0025fe80  0025ff20  018fef78  01000114  018feea8

00000000

0025fce0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000

00000000

0025fd00: 00000000  00000000  00000000  00000000  00000000  00000000  018fef78

019a00d4

0025fd20: 019a0788  019a0308  00000000  00000000  00000000  0000043a  00000010

00000000

0025fd40: 00000000  0000041f  00000000  00000000  019a0bc4  000005b0  00000008

00000000

0025fd60: 00000000  00000000  00000000  00000001  00000000  00000000  00000000

00000000

0025fd80: 00000000  00000000  00000000  00000000  00000000  00000000  00000000

00000000

0025fda0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000

00000000

0025fdc0: 00000000  00000000  00000000  00000000  00000003  01000034  00000004

00000020

0025fde0: 00000005  00000007  00000006  00001000  00000007  019a0000  00000008

00000000

0025fe00: 00000009  01057c80  00000000  00000000  0000000b  00000000  0000000c

00000000

0025fe20: 0000000d  00000000  0000000e  00000000  001ffa2c <019a11d0> 018fef78

02518004

0025fe40: 018feea8  0025ff20  0025ff40 <019a1184> 018fef78  0025ff40  00000000

018feea8

0025fe60: 0025fe68  0025fe70  00000000  00000000  00000002  0025ff6e  0025ff7d (

00000000)

0025fe80:<0025ff82> 0025ffaa  0025ffb1  0025ffbf  0025ffe2  00000000  00000010

00000000

0025fea0: 00000006  00001000  00000011  00000064  00000003  01000034  00000004

00000020

0025fec0: 00000005  00000007  00000007  019a0000  00000008  00000000  00000009

01057c80

0025fee0: 0000000b  00000000  0000000c  00000000  0000000d  00000000  0000000e

00000000

0025ff00: 00000017  00000000  0000001f  0001ffed  00000000  00000000  00000000

00000000

0025ff20: 00020000  019a0000  00000000  00006e1c  018fee1c <0000ae1c> 00000448

00000000

0025ff40: 00020000  01000000  00000000  00726fb0  02600fb0  0072afb0  00129f88

00000000

0025ff60: 00000000  00000000  00000000  2f2e0000  74726f70  61636465  7361766e

77712d00

0025ff80: 57510073  4f4d5f53  5f455355  544f5250  73543d4f  3a62696c  7665642f

706e692f

0025ffa0: 652f7475  746e6576  4f480030  2f3d454d  45485300  2f3d4c4c  2f6e6962

50006873

0025ffc0: 3d485441  6e69622f  73752f3a  69622f72  732f3a6e  3a6e6962  7273752f

6962732f

0025ffe0: 4554006e  6c3d4d52  78756e69  702f2e00  6574726f  6e616364  00736176

00000000

00260000: 464c457f

Return addresses in stack:

    address : <0x01570792> [ /usr/bin/portedcanvas + 0x570792 ]

    address : <0x025f6a06> [ /lib/libuClibc-0.9.29.so + 0x36a06 ]

    address : <0x019a4fc2> [ /lib/ld-uClibc-0.9.29.so + 0x4fc2 ]

    address : <0x019a5094> [ /lib/ld-uClibc-0.9.29.so + 0x5094 ]

    address : <0x0033deae> [ /lib/libstdc++.so.6.0.8 + 0x3deae ]

    address : <0x0026073e> [ /usr/lib/libts-0.0.so.0 + 0x73e ]

    address : <0x01043808> [ /usr/bin/portedcanvas + 0x43808 ]

    address : <0x019a589a> [ /lib/ld-uClibc-0.9.29.so + 0x589a ]

    address : <0x019a11d0> [ /lib/ld-uClibc-0.9.29.so + 0x11d0 ]

    address : <0x019a1184> [ /lib/ld-uClibc-0.9.29.so + 0x1184 ]

   frame  1 : <0x0025ff82> [ portedcanvas + 0x1ff82 ]

    address : <0x0000ae1c> { _print_cfs_rq + 0x110 }

SIGSEGV

root:/usr/bin>

 

It is the same with other application I've built in the same manner.

 

 

QuoteReplyEditDelete

 

 

2009-03-12 10:44:23     Re: Qt static build

Nikolay Chokoev (IRELAND)

Message: 70869   

 

I have './romfs/lib/libgcc_s.so.1' only as shared, how can I build it 'static'?

 

Is there a easy way to 'strip' the static libraries when they are built? Config option?

QuoteReplyEditDelete

 

 

2009-03-12 17:33:04     Re: Qt static build

Nikolay Chokoev (IRELAND)

Message: 70894   

 

Can I find somehow what causes this "NULL pointer access" exception? What could be the reason?

QuoteReplyEditDelete

 

 

2009-03-13 00:19:08     Re: Qt static build

Sonic Zhang (CHINA)

Message: 70904   

 

Compile your qt application with -g option and run it under gdbserver.

 

 

QuoteReplyEditDelete

 

 

2009-03-13 16:02:09     Re: Qt static build

Mike Frysinger (UNITED STATES)

Message: 70969   

 

the linking steps probably left out other important files

QuoteReplyEditDelete

 

 

2009-03-13 17:46:33     Re: Qt static build

Nikolay Chokoev (IRELAND)

Message: 70970   

 

Hi Sonic,

 

Thank you for the suggestion. I'll try that next week, when I back to work.

QuoteReplyEditDelete

 

 

2009-03-13 17:50:16     Re: Qt static build

Nikolay Chokoev (IRELAND)

Message: 70971   

 

Hi Mike,

 

That's most probably what's happened. Can you suggest me how to find out what library/file is left out the linked process?

QuoteReplyEditDelete

 

 

2009-03-17 14:20:13     Re: Qt static build

Nikolay Chokoev (IRELAND)

Message: 71131   

 

Hi Mike,

 

What is the diference between using the '-static' flag and link specific libs statically using the -Bstatic/-Bdynamic? Whi I should not use '-static' in linking my app?

QuoteReplyEditDelete

 

 

2009-03-17 14:30:22     Re: Qt static build

Mike Frysinger (UNITED STATES)

Message: 71132   

 

if you read the gcc specs, you'll see that -static changes flags in the overall linking steps.  since you only want to link QT statically (well need actually since libts doesnt work statically), then you should do -Bstatic -lqt <whatever qt libs> -Bdynamic.

QuoteReplyEditDelete

 

 

2009-03-18 05:18:35     Re: Qt static build

Nikolay Chokoev (IRELAND)

Message: 71193   

 

I run ldd on the qt app and:

 

# bfin-linux-uclibc-ldd portedcanvas

ldd: can't map cache '/etc/ld.so.cache'

checking sub-depends for '/lib/libgcc_s.so.1'

checking sub-depends for 'not found'

checking sub-depends for '/usr/lib/libstdc++.so.6'

checking sub-depends for 'not found'

checking sub-depends for 'not found'

checking sub-depends for '/lib/libc.so.6'

checking sub-depends for '/lib/libm.so.6'

        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00000000)

        libts-0.0.so.0 => not found (0x00000000)

        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00000000)

        libm.so.0 => not found (0x00000000)

        libc.so.0 => not found (0x00000000)

        libc.so.6 => /lib/libc.so.6 (0x00000000)

        libm.so.6 => /lib/libm.so.6 (0x00000000)

        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00000000)

 

 

What does it means?

QuoteReplyEditDelete

 

 

2009-03-18 06:19:42     Re: Qt static build

Nikolay Chokoev (IRELAND)

Message: 71197   

 

...just noticed that the executable is not linked properly against few libraries:

 

/opt/uClinux/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/../../../../bfin-linux-uclibc/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread

/opt/uClinux/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/../../../../bfin-linux-uclibc/bin/ld: skipping incompatible /usr/lib/libdl.a when searching for -ldl

/opt/uClinux/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/../../../../bfin-linux-uclibc/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz

/opt/uClinux/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/../../../../bfin-linux-uclibc/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm

/opt/uClinux/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/../../../../bfin-linux-uclibc/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm

/opt/uClinux/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/../../../../bfin-linux-uclibc/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc

/opt/uClinux/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/../../../../bfin-linux-uclibc/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc

 

How can I fix that?

QuoteReplyEditDelete

 

 

2009-03-18 14:38:10     Re: Qt static build

Mike Frysinger (UNITED STATES)

Message: 71220   

 

neither the ldd output nor these linker warnings matter

Attachments

    Outcomes