opnsense / ports

OPNsense ports on top of FreeBSD
https://opnsense.org/
Other
157 stars 114 forks source link

Can't build net/freeswitch #100

Closed BuildTheRobots closed 2 years ago

BuildTheRobots commented 3 years ago

Good afternoon.

I had the great idea of building net/freeswitch (a sip pbx) on top of my new opnsense install. As I've just moved house and bought a fanless box to run opnsense on, it'd be nice if I didn't have to have a very noisy and power hungry r710 in a corner just for the sake of connecting a few rarely used desk phones.

I know very little about bsd and ports, so I apologise if this is user error, however if I cd /usr/ports/net/freeswitch && make install the system takes forever building packages and then finally dies with the following errors:


>>> defined in ./.libs/libsofiamod.a(libsofiamod_la-mod_sofia.o)
>>> referenced by mod_sofia.c
>>>               libsofiamod_la-mod_sofia.o:(mod_sofia_load) in archive ./.libs/libsofiamod.a

ld: error: relocation R_X86_64_PC32 cannot be used against symbol mod_sofia_globals; recompile with -fPIC
>>> defined in ./.libs/libsofiamod.a(libsofiamod_la-mod_sofia.o)
>>> referenced by mod_sofia.c
>>>               libsofiamod_la-mod_sofia.o:(mod_sofia_load) in archive ./.libs/libsofiamod.a

ld: error: relocation R_X86_64_PC32 cannot be used against symbol mod_sofia_globals; recompile with -fPIC
>>> defined in ./.libs/libsofiamod.a(libsofiamod_la-mod_sofia.o)
>>> referenced by mod_sofia.c
>>>               libsofiamod_la-mod_sofia.o:(mod_sofia_load) in archive ./.libs/libsofiamod.a

ld: error: relocation R_X86_64_PC32 cannot be used against symbol mod_sofia_globals; recompile with -fPIC
>>> defined in ./.libs/libsofiamod.a(libsofiamod_la-mod_sofia.o)
>>> referenced by mod_sofia.c
>>>               libsofiamod_la-mod_sofia.o:(mod_sofia_load) in archive ./.libs/libsofiamod.a

ld: error: relocation R_X86_64_PC32 cannot be used against symbol mod_sofia_globals; recompile with -fPIC
>>> defined in ./.libs/libsofiamod.a(libsofiamod_la-mod_sofia.o)
>>> referenced by mod_sofia.c
>>>               libsofiamod_la-mod_sofia.o:(mod_sofia_load) in archive ./.libs/libsofiamod.a

ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[6]: *** [Makefile:944: mod_sofia.la] Error 1
gmake[6]: Leaving directory '/usr/obj/usr/ports/net/freeswitch/work/freeswitch-1.10.3.-release/src/mod/endpoints/mod_sofia'
gmake[5]: *** [Makefile:850: all] Error 2
gmake[5]: Leaving directory '/usr/obj/usr/ports/net/freeswitch/work/freeswitch-1.10.3.-release/src/mod/endpoints/mod_sofia'
gmake[4]: *** [Makefile:707: mod_sofia-all] Error 1
gmake[4]: Leaving directory '/usr/obj/usr/ports/net/freeswitch/work/freeswitch-1.10.3.-release/src/mod'
gmake[3]: *** [Makefile:608: all-recursive] Error 1
gmake[3]: Leaving directory '/usr/obj/usr/ports/net/freeswitch/work/freeswitch-1.10.3.-release/src'
gmake[2]: *** [Makefile:3737: all-recursive] Error 1
gmake[2]: Leaving directory '/usr/obj/usr/ports/net/freeswitch/work/freeswitch-1.10.3.-release'
gmake[1]: *** [Makefile:1446: all] Error 2
gmake[1]: Leaving directory '/usr/obj/usr/ports/net/freeswitch/work/freeswitch-1.10.3.-release'
*** Error code 1

Stop.
make: stopped in /usr/ports/net/freeswitch```

Happy to do anything that would help get this resolve, though I really don't have half a clue what I'm doing.
Greatest of thanks,