Opened 11 years ago
Closed 10 years ago
#43440 closed enhancement (fixed)
Add modpython to ZNC port
Reported by: | Feuermurmel (Michael Schwarz) | Owned by: | mfeiri |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: | znc |
Description
I tried to add modpython
(by specifying --mod-python
to configure
) to the ZNC port as a variant but failed because of multiple problems. The attached diff is how far I got.
Simply adding the necessary arguments and environment variables for configure
leads to a compiler error in modpython/_znc_core.cpp
along those lines:
modpython/_znc_core.cpp:21058:11: error: no matching member function for call to 'erase' (arg1)->erase(arg2); ~~~~~~~~^~~~~
Not having a lot of experience with C++ and not finding any reference to this specific error when compiling ZNC online, I tried building ZNC with g++ instead of clang. This worked but if I try to do this by setting compiler in the Portfile (as can be seen in the patch), configure
fails because of some problem with Perl:
checking for perl... /opt/local/bin/perl checking for perl_alloc in -lperl... no configure: error: perl not found. Try --disable-perl.
I would really like to see support modpython in the ZNC port but I don't think I can get this to work myself.
Attachments (1)
Change History (6)
comment:1 Changed 11 years ago by mf2k (Frank Schima)
Cc: | mfeiri@… removed |
---|---|
Owner: | changed from macports-tickets@… to mfeiri@… |
Version: | 2.2.1 |
comment:2 Changed 11 years ago by Feuermurmel (Michael Schwarz)
I agree to your comment about the variant's name. Setting the compiler to gcc-4.8
is a leftover from my attempt to get the port to compile at all with modpython
enabled. It seems that clang doesn't like some code in the generated SWIG bindings but I sure hope that switching to GCC isn't actually necessary to enable this variant.
comment:3 Changed 11 years ago by mf2k (Frank Schima)
Setting configure.compiler
directly is not how we handle that now. Instead, you can use blacklist
to blacklist compilers.
Changed 11 years ago by Feuermurmel (Michael Schwarz)
Attachment: | znc-mod-python.diff added |
---|
comment:4 Changed 11 years ago by Feuermurmel (Michael Schwarz)
I've updated the patch to use compiler.blacklist
and also added a variant for Python 3.4. I still hope that this can be done without blacklisting Clang.
comment:5 Changed 10 years ago by mfeiri
Resolution: | → fixed |
---|---|
Status: | new → closed |
Applied in r123377 with small modifications. clang-503.0.40 can successfuly compile modpython, so I limited the scope of the blacklist. Thanks for this patch!
This variant should be called
python33
instead to reflect the python version. Also, why does it set the compiler to gcc48?