[omniORB] FreeBSD and omniORBpy
afo@numlock.org
afo@numlock.org
Wed, 15 Dec 1999 09:29:37 +0100
Brad Chapman wrote:
>
>
>That was exactly the problem. I added config-freebsd.h (just a copy of
>config_linux.h) and edited the config.h main file and everything built
>without a problem. The catch--I'm having problems once again dealing with
>the examples. When I try to run omniidl on the echo_example.idl to generate
>the stubs I get the following:
>
>$ omniidl echo.idl
>Traceback (innermost last):
> File "/usr/local/omniORB/bin/scripts/omniidl", line 30, in ?
> import omniidl.main
> File "/usr/local/omniORB/lib/python/omniidl/main.py", line 66, in ?
> import _omniidl
>ImportError: No module named _omniidl
>
>Similary, if I just try to start up the server without generating stubs:
>
>$ ./echo_example_srv.py &
>[2] 29419
>insomniac# Traceback (innermost last):
> File "./echo_example_srv.py", line 4, in ?
> from omniORB import CORBA, PortableServer
> File "/usr/local/omniORB/lib/python/omniORB/__init__.py", line 88, in ?
> import _omnipy
>ImportError: No module named _omnipy
>
>I have PYTHONPATH, LD_LIBRARY_PATH and regular ol' PATH set according to
>the omniORBpy readme and the README.unix.
> Sorry for the continual problems. Any advice anyone could give
>would be greatly appreciated. Meanwhile I'm keep messing around!
due to missing FreeBSD sections in
omniORB-2.8.0/src/lib/omniORBpy/omniidl/cxx/dir.mk
and
omniORB-2.8.0/src/lib/omniORBpy/modules/omnipy/dir.mk
neither the _omnipymodule.so nor _omniidlmodule.so native modules
for python were created
after applying the following 2 patches i finally managed to get omniORBpy
working on FreeBSD (3.3-RELEASE,omniORB 2.8.0,omniORBpy 19991214)
at least the echo_example sample runs:
--- tmp/omniORB-2.8.0/src/lib/omniORBpy/modules/omnipy/dir.mk Thu Nov 25 12:49
:32 1999
+++ omniORB-2.8.0/src/lib/omniORBpy/modules/omnipy/dir.mk Wed Dec 15 02:31
:12 1999
@@ -65,6 +65,41 @@
)
endif
+#############################################################################
+# Make rules for FreeBSD #
+#############################################################################
+
+ifdef FreeBSD
+
+CXXOPTIONS += -fPIC
+
+libname = _omnipymodule.so
+soname = $(libname).$(OMNIPY_MAJOR)
+lib = $(soname).$(OMNIPY_MINOR)
+
+$(lib): $(OBJS)
+ (set -x; \
+ $(RM) $@; \
+ $(CXXLINK) $(CXXLINKOPTIONS) -shared -o $@ -Wl,-soname,$(soname) $(IMPOR
T_LIBRARY_FLAGS) $(OMNIORB2_LIB_NODYN_DEPEND)\
+ $(filter-out $(LibSuffixPattern),$^) $(OMNIORB2_LIB)\
+ )
+
+all:: $(lib)
+
+clean::
+ $(RM) $(lib)
+
+export:: $(lib)
+ @$(ExportLibrary)
+ @(set -x; \
+ cd $(EXPORT_TREE)/$(LIBDIR); \
+ $(RM) $(soname); \
+ ln -s $(lib) $(soname); \
+ $(RM) $(libname); \
+ ln -s $(soname) $(libname); \
+ )
+endif
+
#############################################################################
# Make rules for Solaris 2.x #
--- tmp/omniORB-2.8.0/src/lib/omniORBpy/omniidl/cxx/dir.mk Wed Dec 1 12:35
:22 1999
+++ omniORB-2.8.0/src/lib/omniORBpy/omniidl/cxx/dir.mk Wed Dec 15 03:15:41 1999
@@ -87,6 +87,42 @@
endif
+#############################################################################
+# Make rules for FreeBSD #
+#############################################################################
+
+ifdef FreeBSD
+
+CXXOPTIONS += -fPIC
+
+libname = _omniidlmodule.so
+soname = $(libname).$(IDLMODULE_MAJOR)
+lib = $(soname).$(IDLMODULE_MINOR)
+
+all:: $(lib)
+
+$(lib): $(OBJS) $(PYOBJS)
+ (set -x; \
+ $(RM) $@; \
+ $(CXXLINK) $(CXXLINKOPTIONS) -shared -o $@ -Wl,-soname,$(soname) $(IMPOR
T_LIBRARY_FLAGS) \
+ $(filter-out $(LibSuffixPattern),$^) $(LIBS)\
+ )
+
+export:: $(lib)
+ @$(ExportLibrary)
+ @(set -x; \
+ cd $(EXPORT_TREE)/$(LIBDIR); \
+ $(RM) $(soname); \
+ ln -s $(lib) $(soname); \
+ $(RM) $(libname); \
+ ln -s $(soname) $(libname); \
+ )
+
+clean::
+ $(RM) $(lib)
+
+endif
+
#############################################################################
# Make rules for Solaris 2.x #
-------- end diff --------------------------------------------------------
anybody knows why i get the following error for an make export
in omniORBpy ?
make[5]: *** No rule to make target ie.py', needed by xport'. Stop.
make[5]: Leaving directory /home/GLOBAL/src/omniORB-2.8.0/src/lib/omniORBpy/omni
idl/python/be/cxx/header'
after commenting out the the rule for tie.py in dir.mk the make export runs fine
ps: duncan can you please change in config/config.mk line 67
from
#platform = i386_freebsd_3.2
into
#platform = x86_freebsd_3.2
thank you
--
// Andre Fornacon
// afo <at> zlug <dot> org
// hardware lebt und ist boese ...