Opened 14 years ago

Closed 13 years ago

#28662 closed submission (fixed)

baresip 0.1.0

Reported by: alfredh (Alfred E. Heggestad) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: SIP, SDP, RTP Cc:
Port: baresip

Description

this portfile adds support for baresip a portable SIP Useragent with Video support. BSD License.

Attachments (4)

patch-modules-sdl-module.mk.diff (427 bytes) - added by alfredh (Alfred E. Heggestad) 14 years ago.
Portfile.2 (1.4 KB) - added by alfredh (Alfred E. Heggestad) 13 years ago.
Portfile (1.5 KB) - added by alfredh (Alfred E. Heggestad) 13 years ago.
baresip-portfile.diff (738 bytes) - added by alfredh (Alfred E. Heggestad) 13 years ago.
Enable additional baresip modules

Download all attachments as: .zip

Change History (21)

comment:1 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to ryandesign@…
Port: baresip added
Status: newassigned

Thanks.

comment:2 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Much of the same cleanup I did for libre in #28661 is needed here for baresip as well. But even so, I cannot get baresip to build; it ends with:

  LD      baresip
Undefined symbols:
  "_main", referenced from:
      start in crt1.10.6.o
     (maybe you meant: _re_main, _SDL_main )
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [baresip] Error 1

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

My understanding is that this is what happens if you forget "-lSDLmain" in the LDFLAGS.

http://stackoverflow.com/questions/4019892/compiling-sdl-on-a-mac

I see "-lSDLmain" in modules/sdl/module.mk, but I don't understand baresip's build system well enough to understand how that's meant to be making its way to the final link command, and why it's not getting there.

Did this build for you?

You didn't declare a dependency on libsdl in the Portfile. Do you have the libsdl port installed? Or a different libsdl installed outside of MacPorts?

Changed 14 years ago by alfredh (Alfred E. Heggestad)

comment:4 Changed 14 years ago by alfredh (Alfred E. Heggestad)

thanks for the feedback, I have updated the Portfile as per your libre changes.

I have fixed the SDL bug in my upstream version, but until that new version is out we can use a local patch for the Macports. The patch file is also attached.

there is no hard dependency on SDL, but it will be used if already installed. should work with both the "libsdl" and "libsdl-devel" packages.

comment:5 Changed 14 years ago by alfredh (Alfred E. Heggestad)

Hi Ryan,

any news on the commit of this package?

/alfred

Changed 13 years ago by alfredh (Alfred E. Heggestad)

Attachment: Portfile.2 added

comment:6 Changed 13 years ago by alfredh (Alfred E. Heggestad)

the latest Portfile upgrades baresip to version 0.2.0

comment:7 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Ok, this builds for me. However, it links with all of the following libraries on my system:

	/opt/local/lib/libSDL-1.2.0.dylib (compatibility version 12.0.0, current version 12.3.0)
	/opt/local/lib/libX11.6.dylib (compatibility version 10.0.0, current version 10.0.0)
	/opt/local/lib/libXext.6.dylib (compatibility version 11.0.0, current version 11.0.0)
	/opt/local/lib/libavcodec.dylib (compatibility version 52.0.0, current version 52.72.2)
	/opt/local/lib/libavdevice.dylib (compatibility version 52.0.0, current version 52.2.0)
	/opt/local/lib/libavformat.dylib (compatibility version 52.0.0, current version 52.64.2)
	/opt/local/lib/libavutil.dylib (compatibility version 50.0.0, current version 50.15.1)
	/opt/local/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/opt/local/lib/libglib-2.0.0.dylib (compatibility version 2801.0.0, current version 2801.7.0)
	/opt/local/lib/libgmodule-2.0.0.dylib (compatibility version 2801.0.0, current version 2801.7.0)
	/opt/local/lib/libgobject-2.0.0.dylib (compatibility version 2801.0.0, current version 2801.7.0)
	/opt/local/lib/libgstreamer-0.10.0.dylib (compatibility version 30.0.0, current version 30.0.0)
	/opt/local/lib/libgthread-2.0.0.dylib (compatibility version 2801.0.0, current version 2801.7.0)
	/opt/local/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.1.0)
	/opt/local/lib/libportaudio.2.dylib (compatibility version 3.0.0, current version 3.0.0)
	/opt/local/lib/libre.dylib (compatibility version 0.2.0, current version 0.2.0)
	/opt/local/lib/libsndfile.1.dylib (compatibility version 2.0.0, current version 2.24.0)
	/opt/local/lib/libspeex.1.dylib (compatibility version 7.0.0, current version 7.0.0)
	/opt/local/lib/libspeexdsp.1.dylib (compatibility version 7.0.0, current version 7.0.0)
	/opt/local/lib/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/opt/local/lib/libswscale.dylib (compatibility version 1.0.0, current version 1.11.0)
	/opt/local/lib/libx264.98.dylib (compatibility version 0.0.0, current version 0.0.0)
	/opt/local/lib/libxml2.2.dylib (compatibility version 10.0.0, current version 10.8.0)
	/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)

The port currently only declares a dependency on libre, which accounts for libre.dylib, libz.dylib, libcrypto.dylib and libssl.dylib. The port either needs to declare a lot more dependencies, or needs to be modified to not use those other libraries, even if they are present.

Changed 13 years ago by alfredh (Alfred E. Heggestad)

Attachment: Portfile added

comment:8 Changed 13 years ago by alfredh (Alfred E. Heggestad)

thanks for your input. I have attached an updated Portfile which fixes the issue. the current Portfile declares dependencies to spandsp-devel and ffmpeg-devel.

comment:9 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Is ffmpeg-devel required or would ffmpeg suffice? It built ok for me with ffmpeg 0.6.3.

Depending on ffmpeg (or ffmpeg-devel) means baresip cannot have a universal variant (because ffmpeg and ffmpeg-devel do not have one).

comment:10 Changed 13 years ago by alfredh (Alfred E. Heggestad)

baresip can use both ffmpeg and ffmpeg-devel package.

if you feel that using ffmpeg is better, we can use that one.

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

Per #14540 I'll write the dependency so ffmpeg will be used by default but ffmpeg-devel could also satisfy the dependency.

comment:12 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

Changed 13 years ago by alfredh (Alfred E. Heggestad)

Attachment: baresip-portfile.diff added

Enable additional baresip modules

comment:13 Changed 13 years ago by alfredh (Alfred E. Heggestad)

Resolution: fixed
Status: closedreopened

Thanks for committing the Portfile. However, I found some additional issues that I think we should fix. the attached patch (baresip-portfile.diff) enables some more modules that actually makes the application useful (coreaudio drivers, g711, quicktime etc). Could you please apply that patch?

I also got an issue with starting baresip, after installed from macports:

dl: dlsym: dlsym(0x7fff5fc43ce8, exports): symbol not found
conf: module stdio.so: Authentication error
dl: dlsym: dlsym(0x7fff5fc43ce8, exports): symbol not found
conf: module g711.so: Authentication error

when baresip loads the dynamic module, it cannot find the "exports" symbol, for some reason. after some debugging I noticed that some symbols are missing in the .so files built by macports (they are present in a regular "make"):

0000000000000d26 s  stub helpers
0000000000000000 t __mh_dylib_header

are they stripped away or something? or are we using some wrong options to CC/LD ?

comment:14 in reply to:  13 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to aeh@…:

Thanks for committing the Portfile. However, I found some additional issues that I think we should fix. the attached patch (baresip-portfile.diff) enables some more modules that actually makes the application useful (coreaudio drivers, g711, quicktime etc). Could you please apply that patch?

Sure, r78859

I also got an issue with starting baresip, after installed from macports:

I'm afraid I don't know what to do about this. You can see exactly what MacPorts is doing by enabling the debug switch when you install:

sudo port -d install baresip

If you see something MacPorts is doing that's not right, let me know. Otherwise you may need to ask the baresip developers for assistance.

comment:15 Changed 13 years ago by alfredh (Alfred E. Heggestad)

I have investigated the problem with the module loading, and found the issue.

it appears that the identity of each .so module was change during the build, for example:

$ otool -D g711.so 
g711.so:
/usr/local/lib/libre.dylib

the install should be the same as the module name (with our without path, I am not sure)

it appears that the new install name is coming from SH_LFLAGS which adds the -install_name option in this patch to libre:

--- mk/re.mk.orig	2010-11-03 06:34:14.000000000 -0500
+++ mk/re.mk	2011-03-28 01:10:55.000000000 -0500
@@ -271,6 +271,7 @@
 	AR		:= ar
 	AFLAGS		:= cru
 	LIB_SUFFIX	:= .dylib
+	SH_LFLAGS	+= -install_name $(PREFIX)/lib/libre$(LIB_SUFFIX)
 	ARCH            := $(shell echo $(MACHINE) | \
 				sed -e 's/\([^-]*\)-.*/\1/')
 endif
@@ -488,9 +488,6 @@

the makefile variable $(SH_LFLAGS) is used both by libre and also by some applications linking to libre, so we should probably find a better solution for this.

is the -install_name option really necessary for working operation? or can we remote it. without the additional patch (no -install_name) both libre and baresip installs and runs successfully (also modules are loaded fine).

comment:16 Changed 13 years ago by alfredh (Alfred E. Heggestad)

should be fixed in TRAC ticket #31412

comment:17 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: reopenedclosed

Thanks, fixed in r84539.

Note: See TracTickets for help on using tickets.