Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#13838 closed defect (fixed)

Problem installing redland-bindings +python (probably python 2.3 dependency)

Reported by: larlet@… Owned by: mf2k (Frank Schima)
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc: arto.bendiken@…, CaptSolo
Port:

Description

I got some trouble with the python redland--binding on leopard, here is the difference with the ruby installation:

$ sudo port install redland-bindings +ruby
--->  Fetching redland-bindings
--->  Verifying checksum(s) for redland-bindings
--->  Extracting redland-bindings
--->  Configuring redland-bindings
--->  Building redland-bindings with target all
--->  Staging redland-bindings into destroot
--->  Installing redland-bindings 1.0.6.1_0+ruby
--->  Activating redland-bindings 1.0.6.1_0+ruby
--->  Cleaning redland-bindings


$ sudo port install redland-bindings +python
--->  Building python23 with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python23/work/Python-2.3.6" && make all " returned error 2
Command output: gcc -L/opt/local/lib -u __dummy -u _PyMac_Error -framework System -framework CoreServices -framework Foundation -o python.exe \
			Modules/python.o \
			-L. -lpython2.3 -ldl -framework CoreServices -framework Foundation
Undefined symbols:
 "__dummy", referenced from:
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [python.exe] Error 1

Error: The following dependencies failed to build: python23
Error: Status 1 encountered during processing.

The issue seemed to be a python23 dependency so I decide to install this one but I got another problem at this point:

$ sudo port install python23
--->  Building python23 with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python23/work/Python-2.3.6" && make all " returned error 2
Command output: gcc -L/opt/local/lib -u __dummy -u _PyMac_Error -framework System -framework CoreServices -framework Foundation -o python.exe \
			Modules/python.o \
			-L. -lpython2.3 -ldl -framework CoreServices -framework Foundation
Undefined symbols:
 "__dummy", referenced from:
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [python.exe] Error 1

Error: Status 1 encountered during processing.

The issue had already been reported to the mailing-list without any suggestion so maybe this is the right place. Maybe the dependency could be set at python24 now? Let me know if I can help.

Attachments (2)

redland-bindings-errors (14.1 KB) - added by CaptSolo 11 years ago.
Verbose output of "port install redland-bindings +python" (with python25)
patch-redland-bindings-python-Makefile.in.diff (701 bytes) - added by CaptSolo 11 years ago.
Makefile patch to get past "symbol(s) not found" error message

Download all attachments as: .zip

Change History (15)

comment:1 Changed 11 years ago by larlet@…

Even if I manually change the dependency from python 2.3 to python2.4, I can't build redland-bindings:

david$ sudo port install redland-bindings +python
Password:
Portfile changed since last build; discarding previous state.
--->  Fetching redland-bindings
--->  Verifying checksum(s) for redland-bindings
--->  Extracting redland-bindings
--->  Configuring redland-bindings
--->  Building redland-bindings with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_redland-bindings/work/redland-bindings-1.0.6.1" && make all " returned error 2
Command output:   "_raptor_locator_byte", referenced from:
      _librdf_python_logger_handler in Redland_wrap.so
      __wrap_raptor_locator_byte in Redland_wrap.so
  "_raptor_locator_file", referenced from:
      _librdf_python_logger_handler in Redland_wrap.so
      __wrap_raptor_locator_file in Redland_wrap.so
  "_rasqal_version_release", referenced from:
      _rasqal_version_release$non_lazy_ptr in Redland_wrap.so
  "_rasqal_version_string", referenced from:
      _rasqal_version_string$non_lazy_ptr in Redland_wrap.so
  "_rasqal_version_decimal", referenced from:
      _rasqal_version_decimal$non_lazy_ptr in Redland_wrap.so
  "_raptor_locator_uri", referenced from:
      _librdf_python_logger_handler in Redland_wrap.so
      __wrap_raptor_locator_uri in Redland_wrap.so
  "_raptor_version_major", referenced from:
      _raptor_version_major$non_lazy_ptr in Redland_wrap.so
  "_rasqal_version_major", referenced from:
      _rasqal_version_major$non_lazy_ptr in Redland_wrap.so
  "_raptor_locator_column", referenced from:
      _librdf_python_logger_handler in Redland_wrap.so
      __wrap_raptor_locator_column in Redland_wrap.so
  "_raptor_locator_line", referenced from:
      _librdf_python_logger_handler in Redland_wrap.so
      __wrap_raptor_locator_line in Redland_wrap.so
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [Redland-stamp] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

Error: Status 1 encountered during processing.

Any help will be really appreciated, I need this lib and I don't know how to install it given the fact that building from sources returns the same error.

comment:2 Changed 11 years ago by jmpp@…

Milestone: Port Bugs

comment:3 Changed 11 years ago by ryandesign (Ryan Schmidt)

Cc: arto.bendiken@… added

Cc'ing maintainer.

comment:4 Changed 11 years ago by jmroot (Joshua Root)

Cc: larlet@… removed

The python23 build problem on Leopard was fixed by r35260. Does redland-bindings +python still fail?

comment:5 Changed 11 years ago by CaptSolo

Can confirm that building of "redland-bindings +python" still fails.

If installing the port as it is, you will get an different error ("configure: WARNING: System redland 1.0.7 does not match - need 1.0.6") and the process will stop before compiling.

That can be fixed by bumping up the version of redland-bindings to match that of redland port:

6c6
< version             1.0.6.1
---
> version             1.0.7.1
18,19c18,19
< checksums           md5 eb527252d46d5e2d16d4f4d2abf6980d \
<                     sha1 70df1706a8c96ee79103bdd0425acdd3b45d3e1d
---
> checksums           md5 ad38f4b5d4f55a87359ebff047a00184 \
>                     sha1 82462035595afe0ef622cf8c1a1a32c2f2b38e97 

After this is done, port installation goes into compilation and fails with a similar set of error messages as reported in the first comment (2008-01-05 14:24:31 changed by larlet@…). There are some small differences (probably due to use of py23 here vs. py24 in the first comment), but in both cases the failure is because of missing symbols:

--->  Attempting to fetch redland-bindings-1.0.7.1.tar.gz from http://download.librdf.org/source/
--->  Verifying checksum(s) for redland-bindings
--->  Extracting redland-bindings
--->  Configuring redland-bindings
--->  Building redland-bindings with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_Users_captsolo_Documents_Code_macports_local-sources_www_redland-bindings/work/redland-bindings-1.0.7.1" && make all " returned error 2
Command output:       __wrap_librdf_digest_to_string in Redland_wrap.so
      __wrap_librdf_parser_get_accept_header in Redland_wrap.so
      __wrap_librdf_uri_to_string in Redland_wrap.so
      __wrap_librdf_node_get_literal_value in Redland_wrap.so
      __wrap_librdf_node_get_literal_value_as_latin1 in Redland_wrap.so
      __wrap_librdf_node_get_literal_value_language in Redland_wrap.so
      __wrap_librdf_node_to_string in Redland_wrap.so
      __wrap_librdf_node_get_blank_identifier in Redland_wrap.so
      __wrap_librdf_statement_to_string in Redland_wrap.so
      __wrap_librdf_model_to_string in Redland_wrap.so
      __wrap_librdf_parser_guess_name in Redland_wrap.so
      __wrap_librdf_parser_get_namespaces_seen_prefix in Redland_wrap.so
      __wrap_librdf_query_results_get_binding_name in Redland_wrap.so
      __wrap_librdf_query_results_to_string in Redland_wrap.so
      __wrap_librdf_serializer_serialize_model_to_string in Redland_wrap.so
      __wrap_librdf_log_message_message in Redland_wrap.so
      __wrap_raptor_locator_file in Redland_wrap.so
  "_PyExc_ValueError", referenced from:
      _PyExc_ValueError$non_lazy_ptr in Redland_wrap.so
  "_PyString_AsString", referenced from:
      _PySwigObject_repr in Redland_wrap.so
      _PySwigObject_print in Redland_wrap.so
      _swig_varlink_print in Redland_wrap.so
      _SWIG_AsCharPtrAndSize in Redland_wrap.so
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[3]: *** [Redland-stamp] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Error: Status 1 encountered during processing.

comment:6 Changed 11 years ago by CaptSolo

Would be good to change python dependency of this port to python25 or python24 (so that a version newer than 2.3 can be used).

However, the problem remains. These are error messages when building with python25:

--->  Fetching redland-bindings
--->  Attempting to fetch redland-bindings-1.0.7.1.tar.gz from http://download.librdf.org/source/
--->  Verifying checksum(s) for redland-bindings
--->  Extracting redland-bindings
--->  Configuring redland-bindings
--->  Building redland-bindings with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_Users_captsolo_Documents_Code_macports_local-sources_www_redland-bindings/work/redland-bindings-1.0.7.1" && make all " returned error 2
Command output:       _librdf_python_logger_handler in Redland_wrap.so
      __wrap_raptor_locator_byte in Redland_wrap.so
  "_raptor_locator_file", referenced from:
      _librdf_python_logger_handler in Redland_wrap.so
      __wrap_raptor_locator_file in Redland_wrap.so
  "_rasqal_version_release", referenced from:
      _rasqal_version_release$non_lazy_ptr in Redland_wrap.so
  "_rasqal_version_string", referenced from:
      _rasqal_version_string$non_lazy_ptr in Redland_wrap.so
  "_rasqal_version_decimal", referenced from:
      _rasqal_version_decimal$non_lazy_ptr in Redland_wrap.so
  "_raptor_locator_uri", referenced from:
      _librdf_python_logger_handler in Redland_wrap.so
      __wrap_raptor_locator_uri in Redland_wrap.so
  "_raptor_version_major", referenced from:
      _raptor_version_major$non_lazy_ptr in Redland_wrap.so
  "_rasqal_version_major", referenced from:
      _rasqal_version_major$non_lazy_ptr in Redland_wrap.so
  "_raptor_locator_column", referenced from:
      _librdf_python_logger_handler in Redland_wrap.so
      __wrap_raptor_locator_column in Redland_wrap.so
  "_raptor_locator_line", referenced from:
      _librdf_python_logger_handler in Redland_wrap.so
      __wrap_raptor_locator_line in Redland_wrap.so
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[3]: *** [Redland-stamp] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

comment:7 Changed 11 years ago by CaptSolo

Could the problem related to some parameters in the compiler command line?

/usr/bin/gcc-4.0 -O2 -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include  -DSWIG_PYTHON_SILENT_MEMLEAK -O2 -L/opt/local/lib   -Wl,-F. -Wl,-F. -bundle -framework Python Redland_wrap.so `redland-config --libs` -o Redland.so
Undefined symbols:
  "_raptor_version_string", referenced from:
      _raptor_version_string$non_lazy_ptr in Redland_wrap.so
  "_raptor_unicode_char_to_utf8", referenced from:
      _librdf_python_unicode_to_bytes in Redland_wrap.so
...

E.g. "-bundle -framework Python"? I don't understand the meaning of most of these parameters, hope someone can help to get to the bottom of this. Will attach a full output w. error messages to this ticket.

Changed 11 years ago by CaptSolo

Attachment: redland-bindings-errors added

Verbose output of "port install redland-bindings +python" (with python25)

comment:8 Changed 11 years ago by CaptSolo

Found a hint that could help overcome the missing symbols problem by modifying the Makefile.

After the patch, compiling finishes OK, but there are still errors when activating the port. Despite those errors, the system thinks that the patch is active (repeated "port install" says that the port is already active), but if you try to use the Python module, the interpreter crashes:

Python 2.4.5 (#1, Jul  3 2008, 22:59:40) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import RDF
Fatal Python error: Interpreter not initialized (version mismatch?)
Abort trap

Seems like a nasty crash. Anyway, attaching Makefile patch to the ticket and hoping that someone here will get further than this.

Changed 11 years ago by CaptSolo

Makefile patch to get past "symbol(s) not found" error message

comment:9 Changed 11 years ago by CaptSolo

Here is what's causing the last problem (redland-bindings for python crashing the interpreter):

bash-3.2# otool -L Redland.so 
Redland.so:
        /System/Library/Frameworks/Python.framework/Versions/2.5/Python (compatibility version 2.5.0, current version 2.5.1)
        /opt/local/lib/librasqal.0.dylib (compatibility version 1.0.0, current version 1.0.0)
        /opt/local/lib/libraptor.1.dylib (compatibility version 3.0.0, current version 3.0.0)
        /opt/local/lib/librdf.0.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.1)

The library is linked with the Python which came with Mac OS X instead of the version that MacPorts has installed. :/

comment:10 Changed 11 years ago by CaptSolo

Cc: captsolo@… added

Cc Me!

comment:11 Changed 11 years ago by mf2k (Frank Schima)

Owner: changed from macports-tickets@… to macsforever2000@…
Status: newassigned

Committed revision r38602. I also changed the variant names for php and perl to match the port names - i.e. 'php5' and 'perl5.8'.

Thanks!

comment:12 Changed 11 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: assignedclosed

comment:13 Changed 10 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.