Bug 145457 - emulators/virtualbox-ose: VBoxManage doesn't work
Summary: emulators/virtualbox-ose: VBoxManage doesn't work
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Virtualbox Team (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-07 15:20 UTC by stacy
Modified: 2010-04-18 10:40 UTC (History)
0 users

See Also:


Attachments
file.diff (2.72 KB, patch)
2010-04-07 15:20 UTC, stacy
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description stacy 2010-04-07 15:20:03 UTC
virtualbox-ose-3.1.6_1

There is a conflict between the bundled version of libpng (libpng-1.2.8) and the current version in ports (png-1.4.1_1).

VBoxManage exits with the following error (if you built the debug version)

Executable: /usr/local/lib/virtualbox/VBoxSVC
pr_LoadLibraryByPathname(): Failed to load '/usr/local/lib/virtualbox/components/VBoxC.so'
nsNativeComponentLoader: GetFactory(VBoxC.so) Load FAILED with error: /usr/local/lib/virtualbox/components/VBoxC.so: Undefined symbol "png_set_longjmp_fn"
ERROR: failed to create a session object!
ERROR: code NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154) - Class not registered (extended info not available)
ERROR: code NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154) - Class not registered (extended info not available)
Most likely, the VirtualBox COM server is not running or failed to start.

Fix: The attached patch for the port's files/patch-configure will cause the port to be built without the bundled libpng.

Patch attached with submission follows:
How-To-Repeat: Highly repeatable; just install the port and run VBoxManage.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2010-04-08 06:11:03 UTC
Responsible Changed
From-To: freebsd-ports-bugs->vbox

Fix synopsis and assign.
Comment 2 Bernhard Froehlich freebsd_committer freebsd_triage 2010-04-08 09:21:47 UTC
I've tried to reproduce this with virtualbox-ose-3.1.6_2 and
png-1.4.1_1 and DEBUG enabled but it just worked. Tested with Qt4 GUI,
SDL GUI and a few VBoxManage calls.

Which VBoxManage command did you use to trigger this? Have you really
recompiled virtualbox after the png update and not before?

--
Bernhard Froehlich
http://www.bluelife.at/
Comment 3 Bernhard Froehlich freebsd_committer freebsd_triage 2010-04-13 13:20:44 UTC
Daisuke Aoyama on emulation@ reported a similar problem and tested this
patch without success.

http://lists.freebsd.org/pipermail/freebsd-emulation/2010-April/007632.html

-- 
Bernhard Froehlich
http://www.bluelife.at/
Comment 4 stacy 2010-04-13 20:01:59 UTC
I just finished testing this on a fresh build. I took a test box and:

  1. installed FreeBSD 8.0-RELEASE from CD
  2. freebsd-update
  3. reboot
  4. portsnap
  5. installed shells/pdksh security/sudo ports-mgmt/portupgrade from ports
  6. installed emulators/virtualbox-ose
         sudo portinstall -Rc emulators/virtualbox-ose
  7. update /etc/rc.conf and /boot/loader.conf
  8. add my account to vboxusers group
  9. reboot
10. test
11. patch
12. recompile/reinstall
         sudo make
         sudo make deinstall reinstall clean
13. test

The test in step 10 triggers the problem as shown below
==========================================================================
Script started on Tue Apr 13 11:50:24 2010
: foo$; VBoxManage list vms
Sun VirtualBox Command Line Management Interface Version 3.1.6_OSE
(C) 2005-2010 Sun Microsystems, Inc.
All rights reserved.

Type Manifest File: /home/stacy/.VirtualBox/xpti.dat
nsNativeComponentLoader: autoregistering begins.
pr_LoadLibraryByPathname(): Failed to load 
'/usr/local/lib/virtualbox/components/VBoxC.so'
nsNativeComponentLoader: SelfRegisterDll(VBoxC.so) Load FAILED with 
error: /usr/local/lib/virtualbox/components/VBoxC.so: Undefined symbol 
"png_set_longjmp_fn"
nsNativeComponentLoader: autoregistering succeeded
nNCL: registering deferred (0)
ERROR: failed to create a session object!
ERROR: code NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154) - Class not 
registered (extended info not available)
Most likely, the VirtualBox COM server is not running or failed to start.
ipcDConnectService Stats
  => number of worker threads: 1
nsStringStats
  => mAllocCount:             56
  => mReallocCount:           15
  => mFreeCount:              56
  => mShareCount:             89
  => mAdoptCount:             10
  => mAdoptFreeCount:         10
: foo$; ^D

Script done on Tue Apr 13 11:50:54 2010
==========================================================================

After applying my patch recompiling and reinstalling, the test in step 
13 works.

I don't understand why others can't reproduce this. This is as generic 
of an install as you can get.

I have all the logs of the build and testing available here:
http://www.millions.ca/~stacy/freebsd/vbox/fromscratch/

-stacy
Comment 5 Beat Gaetzi freebsd_committer freebsd_triage 2010-04-16 09:12:16 UTC
Hi,

Could you please try this patch and check if it fix the problem too:
http://tmp.chruetertee.ch/virtualbox-ose-png.patch

Thanks,
Beat
Comment 6 stacy 2010-04-17 02:11:05 UTC
Beat Gaetzi wrote:
> Could you please try this patch and check if it fix the problem too:
> http://tmp.chruetertee.ch/virtualbox-ose-png.patch

I can confirm that the patch fixes the problem for me.

-stacy
Comment 7 regis.despres 2010-04-17 16:20:25 UTC
Same here.

Before patch on fresh install :  "ERROR: failed to create a session object!"
After latest listed Makefile patch, all went right.

Thanks a lot.
Comment 8 dfilter service freebsd_committer freebsd_triage 2010-04-18 10:37:18 UTC
beat        2010-04-18 09:37:05 UTC

  FreeBSD ports repository

  Modified files:
    emulators/virtualbox-ose Makefile 
  Log:
  - Fix VBoxManage after recent png update
  - Bump PORTREVISION
  
  PR:             ports/145457
  Submitted by:   Daisuke Aoyama <aoyama AT peach.ne.jp> on freebsd-emulation@
  Tested by:      Stacy Millions <stacy AT Millions.Ca>,
                  Regis A. Despres <regis.despres AT businessinteractif.fr>
  
  Revision  Changes    Path
  1.21      +3 -1      ports/emulators/virtualbox-ose/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 9 Beat Gaetzi freebsd_committer freebsd_triage 2010-04-18 10:39:21 UTC
State Changed
From-To: open->closed

Committed. Thanks!