Menu

compile error

Help
2007-11-03
2013-03-09
  • Thomas Enderle

    Thomas Enderle - 2007-11-03

    Hi,

    When compiling xca I get a strange error (see below)
    Does anyone know how to fix this?

    Thanks in advance
    Thomas

    PS: I'm using g++ (GCC) 4.2.3 20071014 (prerelease) (Debian 4.2.2-3)

    -----------------------------
    $ make
    ./configure

    Configuring XCA 0.6.4
    ----------------------------
    Found: Qt/qobject.h at /usr/include/qt4
    Found: qobject.h at /usr/include/qt4/Qt
    Found: libQtGui.so at /usr/lib
    Found: openssl/opensslv.h at /usr/include
    Found: libcrypto.so at /usr/lib

    The Versions of the used libraries are:
            OpenSSL 0.9.8g 19 Oct 2007
            QT: 4.3.2
    GNU Make 3.81

    A usable 'make' executable was found in /usr/bin/make

    make -C ui headers
    make[1]: Entering directory `/tmp/xca-0.6.4/ui'
    /usr/bin/uic-qt4 -o ui_About.h About.ui
    /usr/bin/uic-qt4 -o ui_CaProperties.h CaProperties.ui
    /usr/bin/uic-qt4 -o ui_CertDetail.h CertDetail.ui
    /usr/bin/uic-qt4 -o ui_CertExtend.h CertExtend.ui
    /usr/bin/uic-qt4 -o ui_CrlDetail.h CrlDetail.ui
    /usr/bin/uic-qt4 -o ui_ExportCert.h ExportCert.ui
    /usr/bin/uic-qt4 -o ui_ExportDer.h ExportDer.ui
    /usr/bin/uic-qt4 -o ui_ExportKey.h ExportKey.ui
    /usr/bin/uic-qt4 -o ui_Help.h Help.ui
    /usr/bin/uic-qt4 -o ui_ImportMulti.h ImportMulti.ui
    /usr/bin/uic-qt4 -o ui_KeyDetail.h KeyDetail.ui
    /usr/bin/uic-qt4 -o ui_MainWindow.h MainWindow.ui
    /usr/bin/uic-qt4 -o ui_NewCrl.h NewCrl.ui
    /usr/bin/uic-qt4 -o ui_NewKey.h NewKey.ui
    /usr/bin/uic-qt4 -o ui_NewX509.h NewX509.ui
    /usr/bin/uic-qt4 -o ui_Options.h Options.ui
    /usr/bin/uic-qt4 -o ui_PassRead.h PassRead.ui
    /usr/bin/uic-qt4 -o ui_PassWrite.h PassWrite.ui
    /usr/bin/uic-qt4 -o ui_ReqDetail.h ReqDetail.ui
    /usr/bin/uic-qt4 -o ui_TrustState.h TrustState.ui
    /usr/bin/uic-qt4 -o ui_v3ext.h v3ext.ui
    make[1]: Leaving directory `/tmp/xca-0.6.4/ui'
    make DEP=yes -C lib target.obj
    make[1]: Entering directory `/tmp/xca-0.6.4/lib'
    /usr/bin/moc-qt4 db_crl.h -o moc_db_crl.cpp
    /usr/bin/moc-qt4 db_key.h -o moc_db_key.cpp
    /usr/bin/moc-qt4 db_temp.h -o moc_db_temp.cpp
    /usr/bin/moc-qt4 db_x509.h -o moc_db_x509.cpp
    /usr/bin/moc-qt4 db_x509req.h -o moc_db_x509req.cpp
    /usr/bin/moc-qt4 db_x509super.h -o moc_db_x509super.cpp
    /usr/bin/moc-qt4 pki_base.h -o moc_pki_base.cpp
    /usr/bin/moc-qt4 db_base.h -o moc_db_base.cpp
    gcc -MM -I. -I.. -I/tmp/xca-0.6.4/ui -I/usr/include/qt4 -I/usr/include/qt4/Qt -Wall -ggdb -O2  db_crl.cpp  db_key.cpp  db_temp.cpp  db_x509.cpp  db_x509req.cpp  db_x509super.cpp  pki_base.cpp  db_base.cpp  asn1int.cpp  oid.cpp  pki_pkcs7.cpp  x509rev.cpp  asn1time.cpp  pass_info.cpp  pki_temp.cpp  x509v3ext.cpp  pki_x509.cpp  func.cpp  pki_crl.cpp  pki_x509req.cpp  load_obj.cpp  pki_key.cpp  pki_x509super.cpp  main.cpp  pki_pkcs12.cpp  x509name.cpp  db.cpp  import.cpp  moc_db_crl.cpp  moc_db_key.cpp  moc_db_temp.cpp  moc_db_x509.cpp  moc_db_x509req.cpp  moc_db_x509super.cpp  moc_pki_base.cpp  moc_db_base.cpp > .depend
    make[1]: Leaving directory `/tmp/xca-0.6.4/lib'
    make[1]: Entering directory `/tmp/xca-0.6.4/lib'
    gcc -I. -I.. -I/tmp/xca-0.6.4/ui -I/usr/include/qt4 -I/usr/include/qt4/Qt -Wall -ggdb -O2  -c db_crl.cpp -o db_crl.o
    gcc -I. -I.. -I/tmp/xca-0.6.4/ui -I/usr/include/qt4 -I/usr/include/qt4/Qt -Wall -ggdb -O2  -c db_key.cpp -o db_key.o
    gcc -I. -I.. -I/tmp/xca-0.6.4/ui -I/usr/include/qt4 -I/usr/include/qt4/Qt -Wall -ggdb -O2  -c db_temp.cpp -o db_temp.o
    gcc -I. -I.. -I/tmp/xca-0.6.4/ui -I/usr/include/qt4 -I/usr/include/qt4/Qt -Wall -ggdb -O2  -c db_x509.cpp -o db_x509.o
    db_x509.cpp:590:2: warning: #warning templates
    gcc -I. -I.. -I/tmp/xca-0.6.4/ui -I/usr/include/qt4 -I/usr/include/qt4/Qt -Wall -ggdb -O2  -c db_x509req.cpp -o db_x509req.o
    gcc -I. -I.. -I/tmp/xca-0.6.4/ui -I/usr/include/qt4 -I/usr/include/qt4/Qt -Wall -ggdb -O2  -c db_x509super.cpp -o db_x509super.o
    gcc -I. -I.. -I/tmp/xca-0.6.4/ui -I/usr/include/qt4 -I/usr/include/qt4/Qt -Wall -ggdb -O2  -c pki_base.cpp -o pki_base.o
    gcc -I. -I.. -I/tmp/xca-0.6.4/ui -I/usr/include/qt4 -I/usr/include/qt4/Qt -Wall -ggdb -O2  -c db_base.cpp -o db_base.o
    gcc -I. -I.. -I/tmp/xca-0.6.4/ui -I/usr/include/qt4 -I/usr/include/qt4/Qt -Wall -ggdb -O2  -c asn1int.cpp -o asn1int.o
    gcc -I. -I.. -I/tmp/xca-0.6.4/ui -I/usr/include/qt4 -I/usr/include/qt4/Qt -Wall -ggdb -O2  -c oid.cpp -o oid.o
    gcc -I. -I.. -I/tmp/xca-0.6.4/ui -I/usr/include/qt4 -I/usr/include/qt4/Qt -Wall -ggdb -O2  -c pki_pkcs7.cpp -o pki_pkcs7.o
    gcc -I. -I.. -I/tmp/xca-0.6.4/ui -I/usr/include/qt4 -I/usr/include/qt4/Qt -Wall -ggdb -O2  -c x509rev.cpp -o x509rev.o
    x509rev.cpp: In constructor 'x509rev::x509rev(const X509_REVOKED*)':
    x509rev.cpp:28: error: invalid conversion from 'void*' to 'char*'
    x509rev.cpp:28: error:   initializing argument 3 of 'void* ASN1_dup(int (*)(void*, unsigned char**), void* (*)(void**, const unsigned char**, long int), char*)'
    x509rev.cpp: In member function 'x509rev& x509rev::set(const X509_REVOKED*)':
    x509rev.cpp:46: error: invalid conversion from 'void*' to 'char*'
    x509rev.cpp:46: error:   initializing argument 3 of 'void* ASN1_dup(int (*)(void*, unsigned char**), void* (*)(void**, const unsigned char**, long int), char*)'
    x509rev.cpp: In member function 'X509_REVOKED* x509rev::get() const':
    x509rev.cpp:90: error: invalid conversion from 'void*' to 'char*'
    x509rev.cpp:90: error:   initializing argument 3 of 'void* ASN1_dup(int (*)(void*, unsigned char**), void* (*)(void**, const unsigned char**, long int), char*)'
    make[1]: *** [x509rev.o] Fehler 1
    make[1]: Leaving directory `/tmp/xca-0.6.4/lib'
    make: *** [lib/target.obj] Fehler 2

     
    • Rafael Gandia Castello

      I have exactly the same problem

       
    • s wahn

      s wahn - 2008-03-31

      Me too.
      (Linux version 2.6.18-6-486 (Debian 2.6.18.dfsg.1-18etch1) (waldi@debian.org) (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)))

       
    • s wahn

      s wahn - 2008-03-31

      If I install the QT development files the error messages above there are the following new problem:

      xca-0.6.4# make
      make -C ui headers
      make[1]: Entering directory `/opt/xca-0.6.4/ui'
      make[1]: Nothing to be done for `headers'.
      make[1]: Leaving directory `/opt/xca-0.6.4/ui'
      make DEP=yes -C lib target.obj
      make[1]: Entering directory `/opt/xca-0.6.4/lib'
      gcc -I. -I.. -I/opt/xca-0.6.4/ui -I/usr/include/qt4 -I/usr/include/qt4/Qt -Wall -ggdb -O2  -c db_x509.cpp -o db_x509.o
      db_x509.cpp:590:2: warning: #warning templates
      /opt/xca-0.6.4/ui/ui_PassWrite.h: In member function 'void Ui_PassWrite::setupUi(QDialog*)':
      /opt/xca-0.6.4/ui/ui_PassWrite.h:53: error: 'class QVBoxLayout' has no member named 'setLeftMargin'
      /opt/xca-0.6.4/ui/ui_PassWrite.h:54: error: 'class QVBoxLayout' has no member named 'setTopMargin'
      /opt/xca-0.6.4/ui/ui_PassWrite.h:55: error: 'class QVBoxLayout' has no member named 'setRightMargin'
      /opt/xca-0.6.4/ui/ui_PassWrite.h:56: error: 'class QVBoxLayout' has no member named 'setBottomMargin'
      /opt/xca-0.6.4/ui/ui_PassWrite.h:60: error: 'class QHBoxLayout' has no member named 'setLeftMargin'
      /opt/xca-0.6.4/ui/ui_PassWrite.h:61: error: 'class QHBoxLayout' has no member named 'setTopMargin'
      /opt/xca-0.6.4/ui/ui_PassWrite.h:62: error: 'class QHBoxLayout' has no member named 'setRightMargin'
      /opt/xca-0.6.4/ui/ui_PassWrite.h:63: error: 'class QHBoxLayout' has no member named 'setBottomMargin'
      /opt/xca-0.6.4/ui/ui_PassWrite.h:104: error: 'class QGridLayout' has no member named 'setLeftMargin'
      /opt/xca-0.6.4/ui/ui_PassWrite.h:105: error: 'class QGridLayout' has no member named 'setTopMargin'
      /opt/xca-0.6.4/ui/ui_PassWrite.h:106: error: 'class QGridLayout' has no member named 'setRightMargin'
      /opt/xca-0.6.4/ui/ui_PassWrite.h:107: error: 'class QGridLayout' has no member named 'setBottomMargin'
      /opt/xca-0.6.4/ui/ui_PassWrite.h:108: error: 'class QGridLayout' has no member named 'setHorizontalSpacing'
      /opt/xca-0.6.4/ui/ui_PassWrite.h:109: error: 'class QGridLayout' has no member named 'setVerticalSpacing'
      /opt/xca-0.6.4/ui/ui_PassWrite.h:138: error: 'class QHBoxLayout' has no member named 'setLeftMargin'
      /opt/xca-0.6.4/ui/ui_PassWrite.h:139: error: 'class QHBoxLayout' has no member named 'setTopMargin'
      /opt/xca-0.6.4/ui/ui_PassWrite.h:140: error: 'class QHBoxLayout' has no member named 'setRightMargin'
      /opt/xca-0.6.4/ui/ui_PassWrite.h:141: error: 'class QHBoxLayout' has no member named 'setBottomMargin'
      make[1]: *** [db_x509.o] Error 1
      make[1]: Leaving directory `/opt/xca-0.6.4/lib'
      make: *** [lib/target.obj] Error 2

      Additional to the linux version I tried the win32 version. But I could't found something to generate CRLs.
      Has somebody any idea to solve that problem?

      cu
      swahn

       
    • anonymous coder

      anonymous coder - 2008-05-11

      Me too.
      OS x 10.5 w. gcc4.3

       
      • Christian Hohnstaedt

        Try using QT 4.3 instead of 4.2

         
        • anonymous coder

          anonymous coder - 2008-05-12

          thanks for your reply! I actually tried against qt-4.4...Will try against 4.3 now.

           
    • Craig McQueen

      Craig McQueen - 2008-07-02

      I'm getting this too. I'm running Ubuntu Hardy, with QT 4.3.4, openssl 0.9.8g, gcc 4.2.3.

      It looks as though it's all about ASN1_dup() function, and tighter rules in gcc 4.2. See:
      http://archive.netbsd.se/?ml=openssl-dev&a=2007-06&t=4482976

      So, something needs to change in the way ASN1_dup() is called, in order to compile in newer gcc versions.

       
    • zukka

      zukka - 2008-12-12

      I've made this patch to make it compile... I don't know if that part of the code works anymore, but at least compiles :P

      --- xca-0.6.4/lib/x509rev.cpp    2007-08-13 20:55:50.000000000 +0200
      +++ xca-0.6.4_z/lib/x509rev.cpp    2007-10-22 14:53:01.191085603 +0200
      @@ -25,7 +25,7 @@

      x509rev::x509rev(const X509_REVOKED *n)
      {
      -    rev = X509_REVOKED_dup((X509_REVOKED *)n);
      +    rev = (X509_REVOKED*) ASN1_dup(CHECKED_I2D_OF(X509_REVOKED, i2d_X509_REVOKED),CHECKED_D2I_OF(X509_REVOKED, d2i_X509_REVOKED),(char*)n);
      }

      x509rev::x509rev(const x509rev &n)
      @@ -43,7 +43,7 @@
      {
           if (rev != NULL)
               X509_REVOKED_free(rev);
      -    rev = X509_REVOKED_dup((X509_REVOKED *)n);
      +    rev = (X509_REVOKED*) ASN1_dup(CHECKED_I2D_OF(X509_REVOKED, i2d_X509_REVOKED),CHECKED_D2I_OF(X509_REVOKED, d2i_X509_REVOKED),(char*)n);
           return *this;
      }

      @@ -87,7 +87,7 @@

      X509_REVOKED *x509rev::get() const
      {
      -    return X509_REVOKED_dup(rev);
      +    return (X509_REVOKED*) ASN1_dup(CHECKED_I2D_OF(X509_REVOKED, i2d_X509_REVOKED),CHECKED_D2I_OF(X509_REVOKED, d2i_X509_REVOKED),(char*)rev);
      }

      #undef X509_REVOKED