axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aleksander Slominski <as...@cs.indiana.edu>
Subject Re: Build issues
Date Sat, 29 May 2004 01:30:12 GMT
John Hawkins wrote:

>we seem to be getting into some problems with the build at the moment.
>Build stability is an issue if we are to direct people to just take the
>latest drops. Do you have a regular automated build process? It doesn't
>have to have tests attached just something that merely builds say, on the
>hour every hour and has a log is good enough to verify that we can be happy
>to direct folks to the CVS source. We have a number of tools that can help
>you if you need them that allow you to extract from CVS to a machine and
>build on a regular basis.
>
>What do you think? It breaks my little 'ol heart to see people using gSoap
>!
>  
>
agreed. this process is way way too complicated!!!!!!!!!!!!!!!

here are my impressions after wasting 6+ hours on that and still failed!

maybe automatic builds should be REQUIRED but who can automate builds 
out of CVS if there is so many manual steps!

here is what are my impression - i have fresh version checked out from 
CVS and i have not expected it will be so complicated to build it ...

something like 20+ steps (feels like hundreds of steps ...) to configure 
AXIS-C++? this is insaneley complicated  ..

why on earth there is a separate autogen/runconfig for ws-axis/c, 
samples/client, and samples/server ?!

why configure script is not checked into CVS?! isnt it whole purpose of 
configure script to ease that process?

why not have configure to correclty set apache1/2, expat/xercesc/both in 
./configure intead of manually hacking

why there are so many warnings when compiling sampleS?

it seems that SOAPTransportFactory::initialize() has hardcoded 
/usr/local/Axis/ so unless i change it i get this:

[aslom@archie bin]$ ./httpd -X
DLOPEN FAILED in loading transport library: 
/usr/local/Axis/libs/libaxis_transport.so: cannot open shared object 
file: No such file or directory
DLOPEN FAILED in loading transport library: 
/usr/local/Axis/libs/libaxis_xmlparser.so: cannot open shared object 
file: No such file or directory
Segmentation fault (core dumped)

currently it has this:

int XMLParserFactory::initialize()
{
#ifdef WIN32
#ifdef _DEBUG
        m_pcLibraryPath = "AxisXMLParser_D.dll"; //this will be taken 
from conf\
iguration file
        //m_pcLibraryPath = g_pConfig->getAxConfProperty(AXCONF_XMLPARSER);
#else
        m_pcLibraryPath = "AxisXMLParser.dll"; //this will be taken from 
config\
uration file
        //m_pcLibraryPath = g_pConfig->getAxConfProperty(AXCONF_XMLPARSER);
#endif
#else
        m_pcLibraryPath = "/usr/local/Axis/libs/libaxis_xmlparser.so"; 
//this w\
ill be taken from configuration file
        //m_pcLibraryPath = g_pConfig->getAxConfProperty(AXCONF_XMLPARSER);
#endif
        if (!loadLib())

why //m_pcLibraryPath = g_pConfig->getAxConfProperty(AXCONF_XMLPARSER); 
was commented?

so is everybody supposed to install /usr/local/Axis or nothing will work?

so i went and fixed it ti my /u/home/...tmp/Axis but here is the stopper 
- it seems FileConfig is initialized with default constructor by 
AxisConfig abut default constructor does nto initialize pFILEFile so 
when is destructed out of struck it has non zero (random) in pFILEFile:

  ~AxisFile()
    {
        if(pFILEFile)
            fclose(pFILEFile);
    }

int AxisConfig::readConfFile ()
{
    char carrLine[CONFBUFFSIZE];
    char* pcValue;
    AxisFile fileConfig; /*AxisFile is AxisC++ resource for file 
manipulation */
    char* sConfPath = NULL;
    char* sNewConfPath = (char*) malloc(CONFBUFFSIZE);
    char* key;


    sConfPath = getenv ("AXIS_HOME");
    m_pcValueArray[AXCONF_AXISHOME] = sConfPath;
    if (!sConfPath)
        return AXIS_FAIL;
    m_pcAxisHome = (char*) malloc (CONFBUFFSIZE);
    strcpy (m_pcAxisHome, sConfPath);

    strcpy (sNewConfPath, sConfPath);
    strcat (sNewConfPath, "/axiscpp.conf");
    if (AXIS_SUCCESS != fileConfig.fileOpen(sNewConfPath, "r"))
        return AXIS_FAIL;

    while (AXIS_SUCCESS == fileConfig.fileGet(carrLine, CONFBUFFSIZE))
    {
        int linesize = strlen (carrLine);
        pcValue = strpbrk (carrLine, ":");
        if (!pcValue)
            break;
        key = (char*) malloc (strlen (pcValue));
        pcValue[0] = '\0';
        sscanf (carrLine, "%s", key);

        if (strcmp (key, "WSDDFILEPATH") == 0)
        {
            m_pcValueArray[AXCONF_WSDDFILEPATH] =  (char*) malloc 
(CONFBUFFSIZE);
            strncpy (m_pcValueArray[AXCONF_WSDDFILEPATH], pcValue +
                1, linesize - strlen (key) - 2);
            *(m_pcValueArray[AXCONF_WSDDFILEPATH]+linesize - strlen 
(key) - 2)
                = '\0';
        }
        if (strcmp (key, "AXISLOGPATH") == 0)
        {
            m_pcValueArray[AXCONF_LOGPATH] =  (char*) malloc (CONFBUFFSIZE);
            strncpy (m_pcValueArray[AXCONF_LOGPATH], pcValue +
                1, linesize - strlen (key) - 2);
            *(m_pcValueArray[AXCONF_LOGPATH]+linesize - strlen (key) - 2)
                = '\0';
        }
        if (strcmp (key, "AXISCLIENTLOGPATH") == 0)
        {
            m_pcValueArray[AXCONF_CLIENTLOGPATH] =  (char*) malloc 
(CONFBUFFSIZE);
            strncpy (m_pcValueArray[AXCONF_CLIENTLOGPATH], pcValue +
                1, linesize - strlen (key) - 2);
            *(m_pcValueArray[AXCONF_CLIENTLOGPATH]+linesize - strlen 
(key) - 2)
                = '\0';
        }
        if (strcmp (key, "CLIENTWSDDFILEPATH") == 0)
        {
            m_pcValueArray[AXCONF_CLIENTWSDDFILEPATH] =  (char*) malloc 
(CONFBUFFSIZE);
            strncpy (m_pcValueArray[AXCONF_CLIENTWSDDFILEPATH], pcValue +
                1, linesize - strlen (key) - 2);
            *(m_pcValueArray[AXCONF_CLIENTWSDDFILEPATH]+linesize -
                strlen (key) - 2) = '\0';
        }
        if (strcmp (key, "AXISTRANSPORT_HTTP") == 0)
        {
            m_pcValueArray[AXCONF_TRANSPORTHTTP] =  (char*) malloc 
(CONFBUFFSIZE);
            strncpy (m_pcValueArray[AXCONF_TRANSPORTHTTP], pcValue +
                1, linesize - strlen (key) - 2);
            *(m_pcValueArray[AXCONF_TRANSPORTHTTP]+linesize -
                strlen (key) - 2) = '\0';
        }
        if (strcmp (key, "AXISTRANSPORT_SMTP") == 0)
        {
            m_pcValueArray[AXCONF_TRANSPORTSMTP] =  (char*) malloc 
(CONFBUFFSIZE);
            strncpy (m_pcValueArray[AXCONF_TRANSPORTSMTP], pcValue +
                1, linesize - strlen (key) - 2);
            *(m_pcValueArray[AXCONF_TRANSPORTSMTP]+linesize -
                strlen (key) - 2) = '\0';
        }
        if (strcmp (key, "AXISXMLPARSER") == 0)
        {
            m_pcValueArray[AXCONF_XMLPARSER] =  (char*) malloc 
(CONFBUFFSIZE);
            strncpy (m_pcValueArray[AXCONF_XMLPARSER], pcValue +
                1, linesize - strlen (key) - 2);
            *(m_pcValueArray[AXCONF_XMLPARSER]+linesize -
                strlen (key) - 2) = '\0';
        }

    }

    return AXIS_SUCCESS;
}

so i get this lovely SEGFAULT:

(gdb) where
#0  0x4206b86a in fclose@GLIBC_2.0 () from /lib/tls/libc.so.6
#1  0x42061948 in fclose@@GLIBC_2.1 () from /lib/tls/libc.so.6
#2  0x4019a102 in AxisConfig::readConfFile() (this=0x80c87f8) at 
AxisFile.h:103
#3  0x4017cf7e in initialize_module (bServer=1) at ../Axis.cpp:255
#4  0x40024bbc in module_init (svr_rec=0x80b3334, p=0x80b32fc)
    at mod_axis.cpp:65
#5  0x0806dfce in ap_init_modules ()
#6  0x08079be4 in main ()
#7  0x42015704 in __libc_start_main () from /lib/tls/libc.so.6
(gdb) up
#1  0x42061948 in fclose@@GLIBC_2.1 () from /lib/tls/libc.so.6
(gdb) up
#2  0x4019a102 in AxisConfig::readConfFile() (this=0x80c87f8) at 
AxisFile.h:103
103                 fclose(pFILEFile);
Current language:  auto; currently c++
(gdb) print *this;
Invalid character ';' in expression.
(gdb) print *this
$1 = {m_pcAxisHome = 0x0, m_pcKeyArray = {0x401bfea2 "WSDDFILEPATH",
    0x401bfe7e "AXISLOGPATH", 0x401bfe8a "AXISCLIENTLOGPATH",
    0x401bfe9c "CLIENTWSDDFILEPATH", 0x0, 0x401bfeaf "AXISTRANSPORT_HTTP",
    0x401bfec2 "AXISTRANSPORT_SMTP"}, m_pcValueArray = {
    0x401bfed5 "AXISXMLPARSER", 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
(gdb) print
$2 = {m_pcAxisHome = 0x0, m_pcKeyArray = {0x401bfea2 "WSDDFILEPATH",
    0x401bfe7e "AXISLOGPATH", 0x401bfe8a "AXISCLIENTLOGPATH",
    0x401bfe9c "CLIENTWSDDFILEPATH", 0x0, 0x401bfeaf "AXISTRANSPORT_HTTP",
    0x401bfec2 "AXISTRANSPORT_SMTP"}, m_pcValueArray = {
    0x401bfed5 "AXISXMLPARSER", 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
(gdb) print pFILEFile

so changing to iniitlaize calss variable (that is definitely not 
cleared: it is in Java but no C++ and in C++ object allocated on stack 
just take space AFAIK ...)

  /**
     *   Default constructor
     */
    AxisFile()
    {
       pFILEFile = 0;
    }



do i miss something?

thanks,

alek

-- 
The best way to predict the future is to invent it - Alan Kay




-- 
The best way to predict the future is to invent it - Alan Kay


Mime
View raw message