Skip to content
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

Fixes compilation errors on Mac OS X #273

Closed
wants to merge 0 commits into from

Conversation

mpranj
Copy link
Member

@mpranj mpranj commented Sep 9, 2015

this patch only fixes compilation errors on Mac OS X

@manuelm
Copy link
Contributor

manuelm commented Sep 9, 2015

@mpranj you should consider enabling git pull rebase per default: git config --global pull.rebase true
This avoids the merge commits which clutter the history

@@ -98,7 +98,11 @@ KeySet *elektraDocu = ksNew(20,
#include "readme_elektrify-getenv.c"
KS_END);

pthread_mutex_t elektraGetEnvMutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
#if defined(__APPLE__) && defined(__MACH__)
pthread_mutex_t elektraGetEnvMutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohh, is PTHREAD_RECURSIVE_MUTEX_INITIALIZE really available? I think we can make resolver code much shorter then.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it appears it's available on OS X (not tested extensively yet), don't know about other BSDs

@mpranj
Copy link
Member Author

mpranj commented Sep 10, 2015

Current state: 99% tests passed, 1 tests failed out of 69
Failed test: test_getenv

can you check this on the build server please, I want to make sure I didn't break anything else

@markus2330
Copy link
Contributor

libgetenv should be deactivated at CMake Level for non-glibc systems. (But I can do it)

I will run it on the build server. But something is broken in the pull request, e.g. the changes in doc/Doxyfile, doc/NEWS.md, examples/ksCallback.c do not seem intended. Can you fix this please?

I would not recommend rebasing on merge conflicts. You can also run
git pull --rebase after you have done git pull.

@markus2330
Copy link
Contributor

add to whitelist

@markus2330
Copy link
Contributor

jenkins start build please

@@ -142,7 +142,7 @@ check_resolver dir b /a/b /tmp/a/b
check_resolver dir b a /tmp/@KDB_DB_DIR@/a
check_resolver dir b a/b /tmp/@KDB_DB_DIR@/a/b

T=`mktemp -d`
T=`mktemp -d 2>/dev/null || mktemp -d -t 'libelektra-test'`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you define that as mktemp-elektra function?

@manuelm
Copy link
Contributor

manuelm commented Sep 11, 2015

@markus2330 I also had to disable libgetenv for mingw. My local modifications include:

diff --git a/src/libgetenv/CMakeLists.txt b/src/libgetenv/CMakeLists.txt
index 4e47a29..52d6485 100644
--- a/src/libgetenv/CMakeLists.txt
+++ b/src/libgetenv/CMakeLists.txt
@@ -1,4 +1,4 @@
-if (BUILD_SHARED AND ENABLE_CXX11)
+if (BUILD_SHARED AND ENABLE_CXX11 AND ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
        add_subdirectory(include)
        include_directories(include)

@markus2330
Copy link
Contributor

@manuelm @mpranj in 86b3797 I made the check even more strict than proposed. mingw and Mac OS X should now be excluded. If not, please add further conditions.

@manuelm
Copy link
Contributor

manuelm commented Sep 11, 2015

just tested 86b3797. works for mingw

@markus2330
Copy link
Contributor

Any progress here? Does Elektra compiles and run on Mac OS X? Please give me a status update, this issue is stalling the release.

@markus2330
Copy link
Contributor

@mpranj please create a new branch that only contains the Mac OS X fixes for this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants