Building aegisub

Aegisub (multimedia/aegisub) is a video subtitling software. It has the option of using PortAudio or PulseAudio to provide audio (for synchronizing the subtitles). In the config:

Code:
Enable PortAudio2 audio provider (only one)
Enable PulseAudio audio provider (only one)
Enable OSS audio player (require portaudio)

My problem is that it won't build. I "make", and after getting quite some part of the way it ends with:

Code:
libtool: link: c++ -DAEGISUB -Iinclude -I../libffms/include -I/usr/local/lib/wx
/include/gtk2-unicode-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64
 -D_LARGE_FILES -D__WXGTK__ -fopenmp -I/usr/local/include -I/usr/local/include -I/usr/local
/include -I/usr/local/include -O2 -pipe -I/usr/local/include -I/usr/local/lib/wx/include
/gtk2-unicode-release-2.8/ -I/usr/local/include/wx-2.8 -fno-strict-aliasing -Wall -Wextra
 -Wno-unused-parameter -Wno-long-long -fpermissive -fno-strict-aliasing -std=c++98 -pipe
 -O2 -pthread -pthread -pthread -o aegisub-2.1 aegisub_2_1-font_file_lister.o 
aegisub_2_1-font_file_lister_fontconfig.o aegisub_2_1-MatroskaParser.o 
aegisub_2_1-aegisublocale.o aegisub_2_1-ass_attachment.o [etc etc etc] 
aegisub_2_1-visual_tool_vector_clip.o -Wl,-R/usr/local/lib/perl5/5.10.1/mach/CORE 
-Wl,-E -fstack-protector  -L/usr/local/lib -lGL -lwx_gtk2u_gl-2.8 -lwx_gtk2u_stc-2.8 
-lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 
-lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 
-lwx_baseu_net-2.8 -lwx_baseu-2.8 -L/usr/local/lib/portaudio2 -lportaudio 
/usr/local/lib/libpulse.so /usr/local/lib/libpulsecommon-0.9.22.so 
/usr/local/lib/libX11-xcb.so /usr/local/lib/libSM.so /usr/local/lib/libICE.so 
/usr/local/lib/libXtst.so /usr/local/lib/libXi.so /usr/local/lib/libXext.so 
/usr/local/lib/libX11.so -lrpcsvc /usr/local/lib/libxcb-atom.so /usr/local/lib/libxcb.so 
/usr/local/lib/libXau.so /usr/local/lib/libXdmcp.so /usr/local/lib/libpthread-stubs.so 
-lwrap /usr/local/lib/libsndfile.so /usr/local/lib/libFLAC.so 
/usr/local/lib/libvorbisenc.so /usr/local/lib/libvorbis.so /usr/local/lib/libogg.so 
/usr/local/lib/libdbus-1.so /usr/local/lib/libgdbm.so -lexecinfo -lrt 
/usr/local/lib/libintl.so /usr/local/lib/libiconv.so -lavformat -lavcodec -lswscale 
-lavutil -lpostproc -lhunspell-1.2 libresrc/libresrc.a libaudio_player.a 
libaudio_portaudio.a libaudio_pulseaudio.a libaudio_oss.a libaudiovideo_ffmpegsource.a 
../libffms/libffmpegsource_aegisub.a libsubtitle_provider.a libsubtitle_ass.a 
libauto4_lua.a libauto4_perl.a libmisc_hunspell.a libmisc_universalchardet.a 
../universalchardet/libuniversalchardet.a /usr/local/lib/libfontconfig.so 
/usr/local/lib/libfreetype.so -lz /usr/local/lib/libexpat.so 
-L/usr/ports/multimedia/aegisub/work/aegisub-2.1.8/libass -lass_aegisub 
-L/usr/local/lib/lua51 -llua -L/usr/local/lib/perl5/5.10.1/mach/CORE -lperl -lm -lcrypt 
-lutil -pthread -Wl,-rpath -Wl,/usr/local/lib -Wl,-rpath -Wl,/usr/local/lib



libaudio_portaudio.a(libaudio_portaudio_a-audio_player_portaudio.o)(.text+0x81): In function `PortAudioPlayer::GetCurrentPosition()':
: undefined reference to `Pa_GetStreamInfo'
libaudio_portaudio.a(libaudio_portaudio_a-audio_player_portaudio.o)(.text+0x90): In function `PortAudioPlayer::GetCurrentPosition()':
: undefined reference to `Pa_GetStreamTime'
libaudio_portaudio.a(libaudio_portaudio_a-audio_player_portaudio.o)(.text+0x5ae): In function `PortAudioPlayer::Play(long, long)':
: undefined reference to `Pa_SetStreamFinishedCallback'
libaudio_portaudio.a(libaudio_portaudio_a-audio_player_portaudio.o)(.text+0x5f4): In function `PortAudioPlayer::Play(long, long)':
: undefined reference to `Pa_GetStreamTime'
libaudio_portaudio.a(libaudio_portaudio_a-audio_player_portaudio.o)(.text+0x749): In function `PortAudioPlayer::OpenStream()':
: undefined reference to `Pa_GetLastHostErrorInfo'
libaudio_portaudio.a(libaudio_portaudio_a-audio_player_portaudio.o)(.text+0x7d1): In function `PortAudioPlayer::OpenStream()':
: undefined reference to `Pa_GetDefaultOutputDevice'
libaudio_portaudio.a(libaudio_portaudio_a-audio_player_portaudio.o)(.text+0x849): In function `PortAudioPlayer::GetOutputDevices(wxString)':
: undefined reference to `Pa_GetDeviceCount'
gmake[4]: *** [aegisub-2.1] Fel 1
gmake[4]: Leaving directory `/usr/ports/multimedia/aegisub/work/aegisub-2.1.8/src'
gmake[3]: *** [all-recursive] Fel 1
gmake[3]: Leaving directory `/usr/ports/multimedia/aegisub/work/aegisub-2.1.8/src'
gmake[2]: *** [all] Fel 2
gmake[2]: Leaving directory `/usr/ports/multimedia/aegisub/work/aegisub-2.1.8/src'
gmake[1]: *** [all-recursive] Fel 1
gmake[1]: Leaving directory `/usr/ports/multimedia/aegisub/work/aegisub-2.1.8'
gmake: *** [all] Fel 2
*** Error code 1

Stop in /usr/ports/multimedia/aegisub.
*** Error code 1

Stop in /usr/ports/multimedia/aegisub.
*** Error code 1

Stop in /usr/ports/multimedia/aegisub.
(I cut out a few Aegisub .o's in the first line for length.)

Whether or not I have enabled PortAudio2, PulseAudio and OSS in the config, it ends the same way. If I hack the makefile and add "--without-portaudio" ("build without PortAudio v19 audio provider") Aegisub builds and starts, but complains about not having any audio provider. (Regardless of whether or not I built (and in the program settings selected) PulseAudio instead. So PortAudio might be a must to get sound capabilities.)

I thought it might've been a problem with my installation, but I have the same problem with the fresh install I did when FreeBSD 8.2 came out, as I had with 8.1 and earlier. I've also tried before and after updating the ports tree. Aegisub installed via package doesn't recognize any audio provider either.



I'm not very good at this, but those errors means it needs to locate and incorporate or use some PortAudio files that it cannot find, correct? I've tried using different options, like specifying paths to the .h and .so files and so on, to no avail. (There is of course no mention of Aegisub in the UPDATING file.)

Any tip on how I might get this darn thing going is appreciated.
 
Well, by build I mean make. ("make install" implies "make build", no?) :)

Worked fine, you say? Weird... Do you have PortAudio2 installed also? If not, maybe it just skips the part that's a snag for me. (Like when I specify "--without-portaudio".)

If you have PortAudio2... well, that'd be odd, because I really did just install a fresh 8.2-RELEASE (amd64), and strung together a batch of portinstall [favorite port] ending with aegisub -- and that didn't build then. Can it then be a combination of installed programs? How can I find out?
 
As earlier stated, I have had no luck with the package: I get no sound. It seems to have not been built with PortAudio2. In the settings (View > Options > Audio > Advanced > Audio player), only "oss" and "pulseaudio" are selectable, and I cannot open any audio file (Audio > Open audio file) with either.

Or, that was what I thought. My only trial audio file had been an MP3 file that I made and as such "knew" that it would work. Having selected "oss" as audio player/provider and opening other files... it works! Boy, is my face red... Using pulseaudio gives me core dumps, however.

Well, it's not completely settled, but it works well enough for me, so problem solved I guess?
 
Sceleris said:
Worked fine, you say? Weird... Do you have PortAudio2 installed also? If not, maybe it just skips the part that's a snag for me. (Like when I specify "--without-portaudio".)

If you have PortAudio2... well, that'd be odd, because I really did just install a fresh 8.2-RELEASE (amd64), and strung together a batch of portinstall [favorite port] ending with aegisub -- and that didn't build then. Can it then be a combination of installed programs? How can I find out?

Well at first try I installed with the default options, that is without portaudio2. I deinstalled everything and tried to reinstall with portaudio2 option on, and unfortunately I got an error, but different from yours.

Code:
gmake[4]: Leaving directory `/usr/ports/multimedia/aegisub/work/aegisub-2.1.8/src/libresrc'
gmake[4]: Entering directory `/usr/ports/multimedia/aegisub/work/aegisub-2.1.8/src'
c++ -DHAVE_CONFIG_H -I. -I..  -pthread -I/usr/local/include/portaudio2   -D_REENTRANT -I/usr/local/include    -g   -DAEGISUB -Iinclude -I../libffms/include 
-I/usr/local/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -fopenmp -I/usr/local/include   
-I/usr/local/include   -I/usr/local/include -I/usr/local/include    -pipe -I/usr/local/include -I/usr/local/lib/wx/include/gtk2-unicode-release-2.8/ 
-I/usr/local/include/wx-2.8 -L/usr/local/lib -g -Wall -Wextra -Wno-unused-parameter -Wno-long-long -fpermissive -fno-strict-aliasing -std=c++98 -pipe -O0 -MT 
libaudio_player_a-audio_player.o -MD -MP -MF .deps/libaudio_player_a-audio_player.Tpo -c -o libaudio_player_a-audio_player.o `test -f 'audio_player.cpp' 
|| echo './'`audio_player.cpp
In file included from config/config_unix.h:19,
                 from config.h:12,
                 from audio_player.cpp:39:
./stdwx.h:207:24: error: wx/stc/stc.h: No such file or directory
gmake[4]: *** [libaudio_player_a-audio_player.o] Error 1
gmake[4]: Leaving directory `/usr/ports/multimedia/aegisub/work/aegisub-2.1.8/src'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory `/usr/ports/multimedia/aegisub/work/aegisub-2.1.8/src'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/usr/ports/multimedia/aegisub/work/aegisub-2.1.8/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/multimedia/aegisub/work/aegisub-2.1.8'
gmake: *** [all] Error 2
*** Error code 1

Stop in /usr/ports/multimedia/aegisub.
*** Error code 1

Stop in /usr/ports/multimedia/aegisub.

It complained about the header file stc.h that doesn't exist, and it is kind of weird because it's supposed to be included with x11-toolkits/wxgtk28-contrib-common, port which is one of the dependency for x11-toolkits/wxgtk28-unicode-contrib. I tried to reinstall a few times but somehow the /usr/local/include/wx-2.8/wx/stc directory along with the header file stc.h weren't included.

Anyway, today I tried to install x11-toolkits/wxgtk28-contrib-common separately and finally stc.h file is in place. I managed to install multimedia/aegisub successfully after that.
 
I have a different problem with aegisub-3.2. It builds, but gives me a Bus error on execution. Executing gdb aegisub-3.2 gives me this:
Code:
Starting program: /usr/local/bin/aegisub-3.2
warning: Lowest section in /usr/local/lib/libicudata.so.60 is .hash at 0000000000000120

Program received signal SIGBUS, Bus error.
0x0000000803b06065 in boost::locale::conv::impl::convert_to<wchar_t> ()
   from /usr/local/lib/libboost_locale.so.1.65.1
Current language:  auto; currently minimal
My system is
Code:
FreeBSD ursula 11.1-STABLE FreeBSD 11.1-STABLE #0 r324091: Fri Sep 29 06:13:04 UTC 2017     root@ursula:/usr/obj/usr/src/sys/GENERIC  amd64
 
Ok, I found out the problem was originating by not setting the locale in the environment. Adding locale in /etc/login.conf solved the issue.
 
Back
Top