New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #26209 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

orc 0.4.7 build fails due to use of 'posix_memalign' of 10.5

Reported by: michaelld@… Owned by: michaelld@…
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: rmsfisher@…, russell.jones@…, dersh@…, fitsumbelay@…, matthewapeters@…, rob@…, redbeard+macport@…
Port: orc

Description

MacPorts 1.9.1.99, OSX 10.5.8 i386 only, XCode 3.1.3.

Building in the 'orc-test' directory needs to be disabled. OSX does not provide 'posix_memalign', nor IIRC a way of arbitrary alignment (just on a page boundary via 'valloc'). Ideally, the configure script would check for 'posix_memalign' function and then the code would use something else if it is not available.

Making all in orc-test
[snip]
libtool: link: /usr/bin/gcc-4.0 -dynamiclib  -o .libs/liborc-test-0.4.0.dylib  .libs/liborc_test_0.4_la-orctest.o .libs/liborc_test_0.4_la-orcarray.o .libs/liborc_test_0.4_la-orcrandom.o .libs/liborc_test_0.4_la-orcprofile.o   -L/opt/local/lib ../orc/.libs/liborc-0.4.dylib  -arch i386 -arch i386   -install_name  /opt/local/lib/liborc-test-0.4.0.dylib -compatibility_version 1 -current_version 1.0 -Wl,-single_module -Wl,-exported_symbols_list,.libs/liborc-test-0.4-symbols.expsym
Undefined symbols:
  "_posix_memalign", referenced from:
      _orc_array_new in liborc_test_0.4_la-orcarray.o
ld: symbol(s) not found

Attachments

main.log (55.6 KB) - added by russell.jones@… 3 years ago.
orc build failure
main2.log (3.0 KB) - added by russell.jones@… 3 years ago.
patch fetch failure
main2.2.log (3.0 KB) - added by russell.jones@… 3 years ago.
patch fetch failure
Portfile.diff (557 bytes) - added by drjesacco@… 3 years ago.
Portfile patch: fixes typos

Change History

comment:1 Changed 3 years ago by devans@…

Also observed on OS X 10.5.8 ppc. However, it builds without error on 10.6.4 universal. So seems to be a Leopard and possibly earlier problem.

comment:2 Changed 3 years ago by russell.jones@…

  • Cc russell.jones@… added

Cc Me!

comment:3 Changed 3 years ago by russell.jones@…

Required for schroedinger, the dirac codec implementation, and thus for ffmpeg.

comment:4 Changed 3 years ago by elelay@…

seen also with 10.4.11 PPC

comment:5 Changed 3 years ago by dersh@…

  • Cc dersh@… added

Cc Me!

comment:6 Changed 3 years ago by fitsumbelay@…

  • Cc fitsumbelay@… added

Cc Me!

comment:7 Changed 3 years ago by matthewapeters@…

  • Cc matthewapeters@… added

Cc Me!

comment:8 Changed 3 years ago by rob@…

  • Cc rob@… added

Cc Me!

comment:9 Changed 3 years ago by redbeard+macport@…

CC me

comment:10 Changed 3 years ago by redbeard+macport@…

  • Cc redbeard+macport@… added

Cc Me!

comment:11 in reply to: ↑ description Changed 3 years ago by stephen@…

Replying to michaelld@…:

MacPorts 1.9.1.99, OSX 10.5.8 i386 only, XCode 3.1.3.

Building in the 'orc-test' directory needs to be disabled.

Unfortunately, it's not that easy. The tools directory depends on orc-test. After port patch orc, I cd to the work directory and edited the top-level Makefile to remove the orc-test directory from SUBDIRS. Then port upgrade orc results in

:info:build Making all in tools
:info:build /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I..   -I/opt/local/include -Wall -I.. -O2 -arch i386 -MT orcc.o -MD -MP -MF .deps/orcc.Tpo -c -o orcc.o orcc.c
:info:build mv -f .deps/orcc.Tpo .deps/orcc.Po
:info:build make[2]: *** No rule to make target `../orc-test/liborc-test-0.4.la', needed by `orcc'.  Stop.
:info:build make[1]: *** [all-recursive] Error 1
:info:build make: *** [all] Error 2
:info:build shell command " cd "/opt/local/var/macports/build/_Users_steve_src_MacPorts_dports_devel_orc/work/orc-0.4.7" && /usr/bin/make all" returned error 2
:error:build Target org.macports.build returned: shell command failed
:debug:build Backtrace: shell command failed
    while executing
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
:info:build Warning: the following items did not execute (for orc): org.macports.destroot org.macports.build
:notice:build Log for orc is at: /opt/local/var/macports/logs/_Users_steve_src_MacPorts_dports_devel_orc/main.log

from the tail of the log.

/sigh/

comment:12 Changed 3 years ago by michaelld@…

  • Owner changed from macports-tickets@… to michaelld@…

I'm working on a set of patches to check if 'posix_memalign' and 'valloc' are available; does #ifdef's around them in the file orc-test/orcarray.c, and if neither are available does a #error. This fix (or, something like it) should be pushed upsteam. I'll check it in when it works here, and hopefully it'll work for everyone else too :)

comment:13 Changed 3 years ago by michaelld@…

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in r70897. Please 'sync', 'clean' and try to 'upgrade' again. I'm closing this ticket as fixed, but if these patches don't work for you please reopen it.

comment:14 Changed 3 years ago by russell.jones@…

  • Status changed from closed to reopened
  • Resolution fixed deleted

Doesn't work for me. main.log attached.

Changed 3 years ago by russell.jones@…

orc build failure

comment:15 Changed 3 years ago by michaelld@…

Looks like you need to sync your ports & try again:

sudo port clean orc
sudo port sync
sudo port upgrade orc

should do the trick. Try that and let me know if it works or not.

comment:16 Changed 3 years ago by russell.jones@…

Failed again, this time at the fetch stage. Did

sudo port clean orc
sudo port selfupdate 
sudo port upgrade outdated

which I believe to be equivalent to the steps you mentioned. main.log attached again.

Changed 3 years ago by russell.jones@…

patch fetch failure

Changed 3 years ago by russell.jones@…

patch fetch failure

comment:17 Changed 3 years ago by michaelld@…

BTW> You can tell if the patches are in place if you look at the debug log (e.g., as attached) -- search for "sigsetjmp" and you should see something like the following:

checking for sigaction... yes
checking for sigsetjmp... yes
checking for posix_memalign... no
checking for valloc... yes
checking for clock_gettime in -lrt... no
checking for monotonic clocks... no

and the "yes" or "no" of the middle 2 (checks for "posix_memalign" and "valloc") will vary depending on your OS, but at least one of the 2 should be "yes". If the middle 2 are not in place (i.e., the listing skips from "sigsetjmp" to "clock_gettime"), then the patches are not there & you need to do the "clean", "sync", and "upgrade" as above.

comment:18 Changed 3 years ago by michaelld@…

OK; if you do

pushd `port dir orc`
ls files

does the 'ls' work, and if so does it show any files?

comment:19 Changed 3 years ago by russell.jones@…

Yes, patch_config.h.in.diff (623b) patch_configure.diff (628b) and patch_orc-test_orcarray.c.diff (864b)

comment:20 Changed 3 years ago by michaelld@…

My bad; forgot to change patch names in the Portfile :) Fixed in r70899. Try the "sync" and such again.

Changed 3 years ago by drjesacco@…

Portfile patch: fixes typos

comment:21 Changed 3 years ago by russell.jones@…

It's doing the same thing just now. I'll give it a few minutes and try again.

comment:22 Changed 3 years ago by k.makisupa@…

Better now.....its working as expected.

---> Attempting to fetch orc-0.4.7.tar.gz from http://distfiles.macports.org/orc

as opposed to "patch-configure.diff"

comment:23 Changed 3 years ago by russell.jones@…

Now compiles fine. Thanks :-)

comment:24 Changed 3 years ago by michaelld@…

  • Status changed from reopened to closed
  • Resolution set to fixed

You're welcome; glad we all got it work :)

Note: See TracTickets for help on using tickets.