You are not logged in.

daveshawley

Beginner

  • "daveshawley" is male
  • "daveshawley" started this thread

Posts: 2

Location: Philadelphia, PA, USA

Occupation: Senior Software Architect

  • Send private message

1

Sunday, May 1st 2005, 3:27am

Building 3.3.4 under MacOS 10.4

Here's what I had to do to build 3.3.4 under Tiger. Just a few simple modifications and a
bunch of tries... looks okay though. Your mileage may vary.

src/kernel/qaccessible.cpp:
- add an explicit type for the text_bindings array near line 189

mkspecs/macx-g++/qplatformdefs.h and mkspecs/macx-pbuilder/qplatformdefs.h
- change the macro QT_SOCKLEN_T from int to socklen_t

mkspecs/macx-g++/qmake.conf and mkspecs/macx-pbuilder/qmake.conf
- add "-single_module" to the QMAKE_LFLAGS_SHLIB macro
I'm not sure about this one. Can anyone confirm or deny this setting?

src/sql/drivers/odbc/qsql_odbc.h
- commented out Q_ODBC_VERSION_2 on line 55

src/sql/drivers/qsql_odbc.cpp
- changed the conditional compile statement on line 60 from:
# ifndef Q_OS_WIN64
to:
# if !(defined(SQLLEN) && defined(SQLULEN)) && !defined(Q_OS_WIN64)

src/tools/qt_tools.pri
- commented out the mac specific portion that pulls in dlcompat (around line 105)

If anyone from TrollTech is interested in pushing this into the source tree, it would
be greatly appreciated by all of us Mac users out there :))

Thanks again for some great software.

Dave.

Christian

Unregistered

2

Sunday, May 1st 2005, 9:03am

Thank you very much. I will receive tiger tomorrow :D

sdbrown

Beginner

  • "sdbrown" is male

Posts: 20

Location: Rochester, NY

Occupation: Research Scientist

  • Send private message

3

Tuesday, May 3rd 2005, 4:24pm

RE: Building 3.3.4 under MacOS 10.4

Dave,
Did you use gcc 4.0 or 3.3 with these changes? I didn't see you override the qmake.conf rules to use g++-3.3 but then again, maybe you didn't install XTools and get the default g++ changed to point gcc 4.0. My guess is that your fixes where using 3.3 because I looked at some of the errors using 4.0 and they will need some more significant code changes (at first glance at least).

Scott

sdbrown

Beginner

  • "sdbrown" is male

Posts: 20

Location: Rochester, NY

Occupation: Research Scientist

  • Send private message

4

Tuesday, May 3rd 2005, 5:06pm

RE: Building 3.3.4 under MacOS 10.4

I don't have my machine here at work, but I am assuming you are using gcc 4.0.

Quoted

Originally posted by daveshawley
Here's what I had to do to build 3.3.4 under Tiger. Just a few simple modifications and a
bunch of tries... looks okay though. Your mileage may vary.

src/kernel/qaccessible.cpp:
- add an explicit type for the text_bindings array near line 189


I am pretty sure that you meant in src/kernel/qaccessible_mac.cpp

So can you be a bit more specific with this change? I assume the issue is that text_bindings is declared without the length of the first dimension being explicitly defined.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
struct {
    int qt;
    CFStringRef mac;
    bool settable;
} text_bindings[][10] = {
    { { QAccessible::MenuBar, kAXMenuBarRole, false },
      { QAccessible::Value, kAXValueAttribute, true },
      { QAccessible::Description, kAXRoleDescriptionAttribute, false },
      { QAccessible::Help, kAXHelpAttribute, false },
      { -1, NULL, false }
    },
    { { QAccessible::ScrollBar, kAXScrollBarRole, false },
    ...

So, just count them up (accounting for the #if, etc.) and explicitly size the first dim of the text_bindings array?

5

Tuesday, May 3rd 2005, 8:26pm

My guess is he's using gcc 4.0 as well. BTW, gcc_select is a simple way to set the system default gcc version.

I'm actually having problems building Qt 3.3.4 with gcc 3.3 under OS X 10.4; it built fine under 10.3.
The errors I have referenced multiple definitions of some symbols (dynamic loader type stuff) and then complained about various forms of printf as being undefined symbols.

I'm recompiling with gcc 3.3 again after using gcc_select, so far so good.

6

Tuesday, May 3rd 2005, 11:52pm

Qt 3.3.4 will build under OS X 10.4 after using gcc_select to choose gcc 3.3.

I do get this warning when building Qt and when linking to Qt:

ld: warning prebinding disabled because dependent library: /Users/mrevelle/Projects/ossim/lib/libossim.1.dylib is not prebound
ld: warning multiple definitions of symbol _dlerror
/usr/lib/libSystem.dylib(dyldAPIsInLibSystem.o) definition of _dlerror
/Developer/qt/lib/libqt.dylib(dlfcn.o) definition of _dlerror
ld: warning multiple definitions of symbol _dlsym
/usr/lib/libSystem.dylib(dyldAPIsInLibSystem.o) definition of _dlsym
/Developer/qt/lib/libqt.dylib(dlfcn.o) definition of _dlsym
ld: warning multiple definitions of symbol _dlopen
/usr/lib/libSystem.dylib(dyldAPIsInLibSystem.o) definition of _dlopen
/Developer/qt/lib/libqt.dylib(dlfcn.o) definition of _dlopen
ld: warning multiple definitions of symbol _dladdr
/usr/lib/libSystem.dylib(dyldAPIsInLibSystem.o) definition of _dladdr
/Developer/qt/lib/libqt.dylib(dlfcn.o) definition of _dladdr
ld: warning multiple definitions of symbol _dlclose
/usr/lib/libSystem.dylib(dyldAPIsInLibSystem.o) definition of _dlclose
/Developer/qt/lib/libqt.dylib(dlfcn.o) definition of _dlclose
ld: warning suggest use of -bind_at_load, as lazy binding may result in errors or different symbols being used
symbol _dladdr used from dynamic library /usr/lib/libSystem.dylib(dyldAPIsInLibSystem.o) not from earlier dynamic library libqt.3.dylib(dlfcn.o)
symbol _dlclose used from dynamic library /usr/lib/libSystem.dylib(dyldAPIsInLibSystem.o) not from earlier dynamic library libqt.3.dylib(dlfcn.o)
symbol _dlerror used from dynamic library /usr/lib/libSystem.dylib(dyldAPIsInLibSystem.o) not from earlier dynamic library libqt.3.dylib(dlfcn.o)
symbol _dlopen used from dynamic library /usr/lib/libSystem.dylib(dyldAPIsInLibSystem.o) not from earlier dynamic library libqt.3.dylib(dlfcn.o)
symbol _dlsym used from dynamic library /usr/lib/libSystem.dylib(dyldAPIsInLibSystem.o) not from earlier dynamic library libqt.3.dylib(dlfcn.o)

7

Wednesday, May 4th 2005, 12:16am

And the problem comes from dlfcn.o that's built into libqt.3.3.4.dylib.

Go into $QTDIR/src/Makefile and remove the line that adds dlfcn.o into the list of OBJECTS.

dlfcn.o is from dlcompat, which is no longer necessary in 10.4.

8

Sunday, June 12th 2005, 4:29pm

Please excuse me, but I am not a developer and don't understand how to implement these changes. Could one please post or mail the diffs for me? thanks!

daveshawley

Beginner

  • "daveshawley" is male
  • "daveshawley" started this thread

Posts: 2

Location: Philadelphia, PA, USA

Occupation: Senior Software Architect

  • Send private message

9

Sunday, June 12th 2005, 10:27pm

Building 3.3.4 under MacOS 10.4 (Clarifications)

Okay ... okay .... here are some clarifications. I guess that's what happens when I write
something up quickly :P

(1) It should have been qaccessible_mac.cpp instead of qaccessible.cpp (good catch sdbrown).
And what I mean by "adding an explicit type" is to change the anonymous struct to an explicit
struct:

struct mac_text_bindings_type {
int qt;
CFStringRef mac;
bool settable;
} text_bindings[][10] = {

instead of

struct {
int qt;
CFStringRef mac;
bool settable;
} text_bindings[][10] = {


(2) In qt_tools.pri, simply comment out the mac {} portion at line 104:

mac {
SOURCES+=3rdparty/dlcompat/dlfcn.c
INCLUDEPATH+=3rdparty/dlcompat
}

becomes

#mac {
#SOURCES+=3rdparty/dlcompat/dlfcn.c
#INCLUDEPATH+=3rdparty/dlcompat
#}

This fixes the problem mrevelle reported with all of the linker errors.

(3) I'm not sure why changes were needed for the ODBC stuff... did Apple upgrade the
IODBC version in Tiger? I'm betting that they did. Anyway, the changes in qsql_odbc
seem to be appropriate. I've never IODBC, but I am quite familar with some other ODBC
implementations, so I'm hoping that I am right here.

(4) And, finally, yes. I am using GCC 4.x as installed with the Tiger XTools kit.

I've attached a tarball of the patch files that should do the job. Save the attached file at
the root of the QT tree. Pop open a console, cd into the QT tree and type the following:


rivendell$ pwd
/Users/dshawley/qt-mac-free-3.3.4
rivendell$ tar xfz qt-patches.tar.gz
rivendell$ cat qt-patches/*.diff | patch -p1
patching file src/kernel/qaccessible_mac.cpp
patching file mkspecs/macx-pbuilder/qmake.conf
patching file mkspecs/macx-pbuilder/qplatformdefs.h
patching file src/sql/drivers/odbc/qsql_odbc.cpp
patching file src/sql/drivers/odbc/qsql_odbc.h
patching file src/tools/qt_tools.pri
rivendell$


At this point, you should be good to go.

Enjoy,

Dave.
daveshawley has attached the following file:

This post has been edited 1 times, last edit by "daveshawley" (Jun 12th 2005, 10:30pm)


10

Monday, June 13th 2005, 4:32am

thank you so much! you are a blessing and a scholar!
peace and light.

11

Monday, June 13th 2005, 4:43am

I get this error whon running ./configure

Source code

1
2
3
4
5
6
c++ -c -o qstring.o  -DQT_MACOSX_VERSION= -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -I/Developer/qt/include/qmake -I/Developer/qt/include -I/Developer/qt/include -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/Developer/qt/mkspecs/macx-g++ -DHAVE_QCONFIG_CPP /Developer/qt/src/tools/qstring.cpp
/Developer/qt/src/tools/qstring.cpp:2926:75: error: operator '&&' has no right operand
/Developer/qt/src/tools/qstring.cpp:3025:75: error: operator '&&' has no right operand
/Developer/qt/src/tools/qstring.cpp:3081:75: error: operator '&&' has no right operand
make: *** [qstring.o] Error 1
qmake failed to build. Aborting.

12

Tuesday, June 14th 2005, 4:07am

Got through configuration with dave's help, but found a new problem:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
c++ -c -pipe -Wall -W -Os -fPIC -DQT_SHARED -DQT_ACCESSIBILITY_SUPPORT -DQT_TABLET_SUPPORT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_NIS -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -DQMAC_ONE_PIXEL_LOCK -DQT_NO_IMAGEIO_MNG -DQT_NO_IMAGEIO_JPEG -DQT_NO_STYLE_AQUA -DQT_NO_STYLE_INTERLACE -DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYLE_COMPACT -DQT_NO_STYLE_POCKETPC -I/Developer/qt/mkspecs/macx-g++ -I. -I3rdparty/libpng -I../include -I/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers -I/System/Library/Frameworks/AGL.framework/Versions/A/Headers -I.moc/release-shared-mt/ -o .obj/release-shared-mt/qsocketdevice_unix.o network/qsocketdevice_unix.cpp
network/qsocketdevice_unix.cpp: In function `int qt_socket_accept(int, sockaddr*, int*)':
network/qsocketdevice_unix.cpp:47: error: invalid conversion from 'int*' to 'socklen_t*'
network/qsocketdevice_unix.cpp:47: error:   initializing argument 3 of 'int accept(int, sockaddr*, socklen_t*)'
network/qsocketdevice_unix.cpp: In member function `QSocketDevice::Protocol QSocketDevice::getProtocol() const':
network/qsocketdevice_unix.cpp:132: error: invalid conversion from 'int*' to 'socklen_t*'
network/qsocketdevice_unix.cpp:132: error:   initializing argument 3 of 'int getsockname(int, sockaddr*, socklen_t*)'
network/qsocketdevice_unix.cpp: In member function `int QSocketDevice::option(QSocketDevice::Option) const':
network/qsocketdevice_unix.cpp:324: error: invalid conversion from 'int*' to 'socklen_t*'
network/qsocketdevice_unix.cpp:324: error:   initializing argument 5 of 'int getsockopt(int, int, int, void*, socklen_t*)'
network/qsocketdevice_unix.cpp: In member function `virtual Q_LONG QSocketDevice::readBlock(char*, Q_ULONG)':
network/qsocketdevice_unix.cpp:784: error: invalid conversion from 'int*' to 'socklen_t*'
network/qsocketdevice_unix.cpp:784: error:   initializing argument 6 of 'ssize_t recvfrom(int, void*, size_t, int, sockaddr*, socklen_t*)'
network/qsocketdevice_unix.cpp: In member function `void QSocketDevice::fetchConnectionParameters()':
network/qsocketdevice_unix.cpp:1053: error: invalid conversion from 'int*' to 'socklen_t*'
network/qsocketdevice_unix.cpp:1053: error:   initializing argument 3 of 'int getsockname(int, sockaddr*, socklen_t*)'
network/qsocketdevice_unix.cpp:1057: error: invalid conversion from 'int*' to 'socklen_t*'
network/qsocketdevice_unix.cpp:1057: error:   initializing argument 3 of 'int getpeername(int, sockaddr*, socklen_t*)'
make[2]: *** [.obj/release-shared-mt/qsocketdevice_unix.o] Error 1
make[1]: *** [sub-src] Error 2
make: *** [init] Error 2

13

Friday, June 17th 2005, 12:31pm

With dave's help, I tackled the previous error, but here's a new one
steps to reproduce:

unset DYLD_LIBRARY_PATH
extract qt-mac-3.3.4 archive,
mv qt-mac-3.3.4 qt
extract qt-patches
cat qt-patches/*.diff | patch -p1
edit mkspecs/mac-g++ and mkspecs/pbuilder /qmake.conf and qplatformdefs.h manually
./configure --thread
make

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
rm -f libqui.1.0.0.dylib libqui.dylib libqui.1.dylib libqui.1.0.dylib
c++ -headerpad_max_install_names -prebind -seg1addr 0xB9000000 -prebind -dynamiclib -single_module -compatibility_version       1.0 -current_version      1.0.0 -install_name     libqui.1.dylib -o libqui.1.0.0.dylib .obj/release-shared-mt/qwidgetfactory.o .obj/release-shared-mt/domtool.o .obj/release-shared-mt/uib.o .obj/release-shared-mt/database.o .obj/release-shared-mt/moc_database2.o  -L/Developer/qt/lib -lqt-mt -lz -framework OpenGL -framework AGL 
ln -s libqui.1.0.0.dylib libqui.dylib
ln -s libqui.1.0.0.dylib libqui.1.dylib
ln -s libqui.1.0.0.dylib libqui.1.0.dylib
rm -f ../../../lib/libqui.1.0.0.dylib
rm -f ../../../lib/libqui.dylib
rm -f ../../../lib/libqui.1.dylib
rm -f ../../../lib/libqui.1.0.dylib
mv -f libqui.1.0.0.dylib libqui.dylib libqui.1.dylib libqui.1.0.dylib ../../../lib/
cd designer && make -f Makefile
/Developer/qt/bin/uic -L /Developer/qt/plugins listboxeditor.ui -o listboxeditor.h
dyld: Symbol not found: __ZTI11QTextStream
  Referenced from: /Developer/qt/bin/uic
  Expected in: /usr/local/lib/libqt-mt.3.dylib

make[4]: *** [listboxeditor.h] Trace/BPT trap
make[3]: *** [sub-designer] Error 2
make[2]: *** [sub-designer] Error 2
make[1]: *** [sub-tools] Error 2
make: *** [init] Error 2

This post has been edited 1 times, last edit by "bennyp" (Jun 17th 2005, 12:31pm)


14

Saturday, June 18th 2005, 11:04pm

I used gentoo for mac os x to reinstall JPEG
now I get this error when I type make

Source code

1
2
3
4
5
6
7
8
9
10
11
cd designer && make -f Makefile
/Developer/qt/bin/uic -L /Developer/qt/plugins listboxeditor.ui -o listboxeditor.h
dyld: Symbol not found: __cg_jpeg_resync_to_restart
  Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
  Expected in: /usr/local/lib/libJPEG.dylib

make[4]: *** [listboxeditor.h] Trace/BPT trap
make[3]: *** [sub-designer] Error 2
make[2]: *** [sub-designer] Error 2
make[1]: *** [sub-tools] Error 2
make: *** [init] Error 2