-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix building with mingw-w64-gcc #389
Conversation
pkgconfig files could be used on Windows by both MSVC and MinGW compilers
WIN32 is not defined by default on MinGW. While _WIN32 is known be always defined on Windows reported before: https://issues.apache.org/jira/browse/LOGCXX-5
…t-of-tree building.
WIN32 compile definition is required.
`!(defined(_WIN32) && defined(_LIBCPP_VERSION))` was added because In some platforms winpthreads exist but It's not used by libc++.
88dda4a
to
23e7ad7
Compare
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/liblog4cxx.pc.in" | ||
"${CMAKE_CURRENT_BINARY_DIR}/lib${LOG4CXX_LIB_NAME}.pc" | ||
) | ||
# Support for pkg-config in consuming projects |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is pkg-config
available on Windows? I don't think we want to always install the .pc file.
Adding a new option to force the .pc installation feels better to me, I'm not sure if anybody else has any thoughts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, It's available.
Does it hurt to install pc file?
Coul you please post versions of mingw environments and compilers you have tested this PR with? |
UCRT64: GCC 14.1.0 + Binutils 2.42 CMake: 3.30.0 APR 1.7.4 Tests: 61/64 |
Could you post output of the tests that are failing? |
|
Could you also change locationinfo.h |
With the following change to add some debug statements:
The following stack trace suggests there is a bug in the ucrt64 runtime:
|
UCRT runtime comes from Windows OS, We could do nothing about. |
Also MinGW apps are native Windows and shouldn't have any issue with |
I believe locationinfo.h needs to set LOG4CXX_SHORT_FILENAME_SPLIT_CHAR based on the compiler, not the system The following change fixes
|
Before using gdb, you need to ensure the directory contain log4cxx.dll is named on the path. For example,
�
export PATH=/home/steph/logging-log4cxx/buildsrc/main/cpp:$PATH
�
�
From: مهدي شينون (Mehdi Chinoune) ***@***.***>
Sent: Friday, July 12, 2024 11:24 PM
To: apache/logging-log4cxx ***@***.***>
Cc: Stephen Webb ***@***.***>; Mention ***@***.***>
Subject: Re: [apache/logging-log4cxx] Fix building with mingw-w64-gcc (PR #389)
�
@swebb2066 <https://github.com/swebb2066> What did you to debug.
I built it with CMAKE_BUILD_TYPE=Debug with no luck!
—
Reply to this email directly, view it on GitHub <#389 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADJDRC3LQBDBUMCH23J7V4LZL7KF7AVCNFSM6AAAAABKTCSG3GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRVGU4DGOJYGA> .
You are receiving this because you were mentioned.Message ID: ***@***.***>
…--
This email has been checked for viruses by Avast antivirus software.
www.avast.com
|
When telnet appender is not explictly closed, the onexit processing chain does not terminate. The following change will at least fix the test.
|
Fixes #388