You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Mark <ma...@yahoo.com> on 2006/07/26 00:29:11 UTC

ant build error - g4cxx: Cannot get information about host: unknown.host.local

I am trying to do a build for MS VC++ 7.1.  I am using
the latest ant and jdk 1.5.

I checked out the svn trunk and followed the
directions in the install file.  I have patch.exe and
sed.exe installed via cygwin (and cygwin\bin at the
end of my path).

The build of the .lib and .dll seems to succeed, but I
get an error during the test.  Here is the output:

[exec] 2006-07-25 17:38:22,305 DEBUG
org.apache.log4j.rolling.SizeBasedRoll
ingTest -Hello--24
     [exec]
..................................................................lo
g4cxx: Cannot get information about host:
unknown.host.local
     [exec] .......................................


     [exec] !!!FAILURES!!!
     [exec] Test Results:
     [exec] Run:  261   Failures: 0   Errors: 1

     [exec] 1) test:
OptionConverterTestCase::testUserHome (E)
     [exec] uncaught exception of unknown type

BUILD FAILED
C:\development\log4cxx\trunk\build.xml:1082: exec
returned: 1

Any suggestions on what I am missing?

Thanks

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: ant build error - g4cxx: Cannot get information about host: unknown.host.local

Posted by Andreas Fester <af...@apache.org>.
Curt Arnold wrote:
[...]
> I'm pretty sure that the message "Cannot get information about host:
> unknown.host.local" is unrelated to the test failure in
> "OptionConverterTestCase::testUserHome" in file
> tests/src/helpers/optionconvertertestcase.cpp.

Curt, you are absolutely right. I just checked, and I also get this message
on Linux. The reason why I never paid attention to it so far might be
that there are a lot of messages printed on stderr/stdout, especially
from the RollingTests.

IMHO we should try to minimize those messages in the test cases, so
that only the usual cppunit messages are printed.

This would also include using LogLog::warning instead of LogLog::error
for messages like " Cannot get information about host: unknown.host.local"
or "Empty conversion specifier", unless it is really an error in which case
it should be fixed either in the test case or in the implementation.

Thanks,

	Andreas


Re: ant build error - g4cxx: Cannot get information about host: unknown.host.local

Posted by Mark <ma...@yahoo.com>.
Curt,

> Please update and rerun and see if the test now
> passes.  If you are  
> curious, try to set into apr_uid_homepath_get() and
> see where it goes  
> wrong. 

The build now succeeds.  Thanks.

The failure occurs in apr_uid_homepath_get here:

-------------
if ((rv = RegOpenKeyEx(HKEY_LOCAL_MACHINE, regkey, 0, 
                           KEY_QUERY_VALUE, &key)) !=
ERROR_SUCCESS)
        return APR_FROM_OS_ERROR(rv);
---------------

The value for regkey at this point does not match
anything under ProfileList in the registry (there are
several that almost match but the actual keys have a
dash and four digits added on).

BTW I am using XP Pro SP2.

Thanks again,

Mark

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: ant build error - g4cxx: Cannot get information about host: unknown.host.local

Posted by Curt Arnold <ca...@apache.org>.
On Jul 25, 2006, at 5:29 PM, Mark wrote:

> I am trying to do a build for MS VC++ 7.1.  I am using
> the latest ant and jdk 1.5.
>
> I checked out the svn trunk and followed the
> directions in the install file.  I have patch.exe and
> sed.exe installed via cygwin (and cygwin\bin at the
> end of my path).
>
> The build of the .lib and .dll seems to succeed, but I
> get an error during the test.  Here is the output:
>
> [exec] 2006-07-25 17:38:22,305 DEBUG
> org.apache.log4j.rolling.SizeBasedRoll
> ingTest -Hello--24
>      [exec]
> ..................................................................lo
> g4cxx: Cannot get information about host:
> unknown.host.local
>      [exec] .......................................
>
>
>      [exec] !!!FAILURES!!!
>      [exec] Test Results:
>      [exec] Run:  261   Failures: 0   Errors: 1
>
>      [exec] 1) test:
> OptionConverterTestCase::testUserHome (E)
>      [exec] uncaught exception of unknown type
>
> BUILD FAILED
> C:\development\log4cxx\trunk\build.xml:1082: exec
> returned: 1
>
> Any suggestions on what I am missing?
>
> Thanks
>

I'm pretty sure that the message "Cannot get information about host:  
unknown.host.local" is unrelated to the test failure in  
"OptionConverterTestCase::testUserHome" in file tests/src/helpers/ 
optionconvertertestcase.cpp.

testUserHome didn't check the return status of the  
apr_uid_homepath_get(), so if that failed you might get an exception  
in the subsequent code.  I've modified the test (rev 425948) to check  
the status value of the apr methods and skip the rest of the test if  
any of the APR methods return a failure code.  From examining the APR  
source code, the test would fail on Windows CE since it would return  
APR_ENOTIMPL for apr_uid_current.  I'm not sure of a mechanism that  
would cause the test to fail on a traditional Windows install, but  
maybe if the user's home directory isn't set or doesn't exist.

Please update and rerun and see if the test now passes.  If you are  
curious, try to set into apr_uid_homepath_get() and see where it goes  
wrong. 

Re: ant build error - g4cxx: Cannot get information about host: unknown.host.local

Posted by Mark <ma...@yahoo.com>.
Andreas,

> can you change the string "unknown.host.local"
> in line 70 of
tests/src/helpers/inetaddresstestcase.cpp to
> something  different, like "unknown.host.remote", 
> recompile and check if the tests
> then print the new string in the error message? If
> yes, I suppose a linking issue or a mixture of debug
> and non-debug libraries...

Yes, doing so caused the new string to be printed.

I'm not sure what to look for since I'm using the
standard vsvars32.bat and unmodified build.xml file.

Thanks,

Mark

--- Andreas Fester <af...@apache.org> wrote:

> Hi Mark,
> 
> this is strange since it is the host name which is
> used
> in the InetAddressTestCase to verify if the
> UnknownHostException
> works properly. Just to be sure: can you change the
> string "unknown.host.local"
> in line 70 of
> tests/src/helpers/inetaddresstestcase.cpp to
> something
> different, like "unknown.host.remote", recompile and
> check if the tests
> then print the new string in the error message? If
> yes, I suppose
> a linking issue or a mixture of debug and non-debug
> libraries...
> 
> Best Regards,
> 
> 	Andreas
> 
> Mark wrote:
> > I am trying to do a build for MS VC++ 7.1.  I am
> using
> > the latest ant and jdk 1.5.
> > 
> > I checked out the svn trunk and followed the
> > directions in the install file.  I have patch.exe
> and
> > sed.exe installed via cygwin (and cygwin\bin at
> the
> > end of my path).
> > 
> > The build of the .lib and .dll seems to succeed,
> but I
> > get an error during the test.  Here is the output:
> > 
> > [exec] 2006-07-25 17:38:22,305 DEBUG
> > org.apache.log4j.rolling.SizeBasedRoll
> > ingTest -Hello--24
> >      [exec]
> >
>
..................................................................lo
> > g4cxx: Cannot get information about host:
> > unknown.host.local
> >      [exec]
> .......................................
> > 
> > 
> >      [exec] !!!FAILURES!!!
> >      [exec] Test Results:
> >      [exec] Run:  261   Failures: 0   Errors: 1
> > 
> >      [exec] 1) test:
> > OptionConverterTestCase::testUserHome (E)
> >      [exec] uncaught exception of unknown type
> > 
> > BUILD FAILED
> > C:\development\log4cxx\trunk\build.xml:1082: exec
> > returned: 1
> > 
> > Any suggestions on what I am missing?
> > 
> > Thanks
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> > http://mail.yahoo.com 
> > 
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: ant build error - g4cxx: Cannot get information about host: unknown.host.local

Posted by Andreas Fester <af...@apache.org>.
Hi Mark,

this is strange since it is the host name which is used
in the InetAddressTestCase to verify if the UnknownHostException
works properly. Just to be sure: can you change the string "unknown.host.local"
in line 70 of tests/src/helpers/inetaddresstestcase.cpp to something
different, like "unknown.host.remote", recompile and check if the tests
then print the new string in the error message? If yes, I suppose
a linking issue or a mixture of debug and non-debug libraries...

Best Regards,

	Andreas

Mark wrote:
> I am trying to do a build for MS VC++ 7.1.  I am using
> the latest ant and jdk 1.5.
> 
> I checked out the svn trunk and followed the
> directions in the install file.  I have patch.exe and
> sed.exe installed via cygwin (and cygwin\bin at the
> end of my path).
> 
> The build of the .lib and .dll seems to succeed, but I
> get an error during the test.  Here is the output:
> 
> [exec] 2006-07-25 17:38:22,305 DEBUG
> org.apache.log4j.rolling.SizeBasedRoll
> ingTest -Hello--24
>      [exec]
> ..................................................................lo
> g4cxx: Cannot get information about host:
> unknown.host.local
>      [exec] .......................................
> 
> 
>      [exec] !!!FAILURES!!!
>      [exec] Test Results:
>      [exec] Run:  261   Failures: 0   Errors: 1
> 
>      [exec] 1) test:
> OptionConverterTestCase::testUserHome (E)
>      [exec] uncaught exception of unknown type
> 
> BUILD FAILED
> C:\development\log4cxx\trunk\build.xml:1082: exec
> returned: 1
> 
> Any suggestions on what I am missing?
> 
> Thanks
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
>