Menu

#112 Compile Error Sun Solaris and HP-UX

Compilation Issues
open
None
1
2006-04-03
2002-11-18
No

Hi,
we have many UNIX-Servers and kompiled QT-Lib &
XXDIFF on SuSe LINUX 8 and IBM-AIX 4.3 successfully
with the GCC 2.95.
But we problems on Sun and HP:

Sun Solaris

GCC 2.95.3

xxdiff:

bash-2.03$ tmake xxdiff.pro >
Makefile
bash-2.03$
make
g++ -c -Wall -W -O2 -DNO_DEBUG -I. -I/opt/qt/include -
o optionsDialog.o optionsD
ialog.cpp

g++ -c -Wall -W -O2 -DNO_DEBUG -I. -I/opt/qt/include -
o searchDialog.o searchDia
log.cpp

g++ -c -Wall -W -O2 -DNO_DEBUG -I. -I/opt/qt/include -
o app.o app.cpp
app.cpp: In method `void XxApp::editFile(const QString
&)':
app.cpp:2206: passing `int *' as argument 4 of
`setsockopt(int, int, int, const char *,
int)'
make: *** [app.o] Error 1

HP-UX 10.20

GCC 2.95.2

g++ -c -Wall -W -O2 -DNO_DEBUG -I. -I/opt/qt/include -
o buffer.o buffer.cpp
buffer.cpp: In method `unsigned int
XxBuffer::computeLineNumbersWidth(const QFon
t &)
const':
buffer.cpp:495: implicit declaration of function `int snprintf
(...)'
make: *** [buffer.o] Error
1

73 und 55 de DF7BE

Discussion

  • Martin Blais

    Martin Blais - 2003-03-18
    • assigned_to: nobody --> blais
     
  • Martin Blais

    Martin Blais - 2003-03-18

    Logged In: YES
    user_id=10996

    for solaris bug: you need to ifdef.

    for hp/ux bug: you need to include the file that declares
    snprintf.

    i have access to neither of these platforms at the moment...
    feel free to send me a patch.

    cheers,

     
  • E. L. Veum

    E. L. Veum - 2003-12-29

    Logged In: YES
    user_id=917779

    Hello.

    I have compiled on many platforms. Let me detail the least
    common denominators for you.

    You'll need to make sure you use QT 3.x. QT 2.x did
    not work with xxdiff-2.9.2, on any platforms. In paticular, I
    have been using QT-3.1.2. I have tried QT-2.x and the
    compile blows up in a similar manner as you describe.

    Also, you'll need to use/try the GCC-3.2.3 compiler on some
    platforms, as it has many fixes. GCC-2.95.2 works fine on
    Solaris and Linux, but the C++ compiler functionality for other
    platforms like HP-UX,Tru64,AIX etc is not fully fixed/operation
    until you move into the more recent GCC compilers.

    Also, don't bother trying to use the native compilers unless
    you are on Solaris. This is a real pain, and will get you
    nowhere, unless you want to spend weeks porting the QT lib.
    If you could get the QT libs ported to use all major unix
    vendors compilers, the xxdiff port would be trivial, but we're
    not there yet. This is my advice from a seasoned (10/15+
    yrs) porter/developer.

    Regards,

    Eric Veum

     
  • Dimitri Papadopoulos

    Logged In: YES
    user_id=52414

    I don't understand the rant about Qt not building with Unix
    native compilers. It does build on HP-UX, Irix, Tru64,
    Solaris, AIX and other Unix platforms using the native
    compiler. In many cases you do need a recent version or a
    properly patched compiler or system, but that's about it. Qt
    builds out of the box.

    About HP-UX 10.20: There's no snprintf() available on this
    platform:
    http://devresource.hp.com/STK/impacts/i302.html
    Either use sprintf() instead and ignore related security
    issues, or copy a custom snprintf() function from some other
    project:
    http://cvs.mess.org:6502/cgi-bin/viewcvs.cgi/src/unix/snprintf.c?rev=1.4&content-type=text/vnd.viewcvs-markup

    About the Solaris issue

     
  • Martin Blais

    Martin Blais - 2004-11-02
    • priority: 5 --> 1
     
  • Martin Blais

    Martin Blais - 2006-04-03
    • milestone: --> Compilation Issues
     
  • Martin Blais

    Martin Blais - 2006-04-03
    • priority: 1 --> 3
     
  • Martin Blais

    Martin Blais - 2006-04-03
    • priority: 3 --> 1
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.