# multimedia/mkvtoolnix



## ssbear (Jan 8, 2017)

Hi all.


I've got an error when I try to build multimedia/mkvtoolnix for two weeks (I had the same error still I'm trying to upgrade from 9.3.1) :

```
c++ -L/usr/local/lib -fstack-protector -L/usr/local/lib
-Llib/avilib-0.6.10 -Llib/librmff -Lsrc/common -o src/mkvmerge
src/merge/mkvmerge.o -Lsrc/merge -lmtxmerge -Lsrc/input -lmtxinput
-Lsrc/output -lmtxoutput -Lsrc/merge -lmtxmerge -lmtxcommon -lmagic -lz
-L/usr/local/lib -lmatroska -L/usr/local/lib -lebml -lz -lpugixml -lintl
-lboost_regex -lboost_filesystem -lboost_system -lavi -lrmff
-Lsrc/mpegparser -lmpegparser -lFLAC -logg -lm -lvorbis -logg
src/common/libmtxcommon.a(ebml_chapters_converter.o): In function
`mtx::xml::ebml_chapters_converter_c::fix_xml(std::__1::shared_ptr<pugi::xml_document>&)
const':
src/common/xml/ebml_chapters_converter.cpp:(.text+0xc15): undefined
reference to `_ZN4pugi14xpath_node_setaSEOS0_'
src/common/xml/ebml_chapters_converter.cpp:(.text+0xc98): undefined
reference to `_ZN4pugi14xpath_node_setaSEOS0_'
c++: error: linker command failed with exit code 1 (use -v to see
invocation)
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/multimedia/mkvtoolnix
*** Error code 1

Stop.
make: stopped in /usr/ports/multimedia/mkvtoolnix
```

Do you have any idea? See my /etc/make.conf, in case:


```
# Begin portconf settings
# Do not touch these lines
.if !empty(.CURDIR:M/usr/ports*) && exists(/usr/local/libexec/portconf)
_PORTCONF!=/usr/local/libexec/portconf
.if ${_PORTCONF} != "|"
.for i in ${_PORTCONF:S/^|//:S/|/ /g}
${i:C/^([^=]*)=.*/\1/}=${i:C/^[^=]*=//:S/%/ /g}
.endfor
.endif
.endif
# End portconf settings

OPTIONS_UNSET=CUPS DOCS EXAMPLES DEBUG
OPTIONS_SET=OPTIMIZED_CFLAGS

CPUTYPE?=core2
#CFLAGS=-O2 -pipe -fno-strict-aliasing -march=core2
#COPTFLAGS=-O2 -pipe -fno-strict-aliasing -march=core2

BUILD_STATIC=YES
BUILD_OPTIMIZED=YES
WITH_CPUFLAGS=YES
WITHOUT_DEBUG=YES
WITHOUT_NOUVEAU=YES
```

Do you have any ideas? Since I upgrade libboost, I can't use mkvtoolnix, I need to rebuild it, but I can't... Thanks a lot for your answers !


----------



## SirDice (Jan 9, 2017)

I suggest removing everything from /etc/make.conf and trying again.


----------



## YuryG (Jan 10, 2017)

Tried to rebuild textproc/libebml?


----------



## ssbear (Jan 15, 2017)

Same error after cleaning my /etc/make.conf and rebuild textproc/libebml


----------



## ssbear (Jan 15, 2017)

Actually, I had to do a `pkg install mkvtoolnix` (I suppose package repository has been updated recently), and it worked. But I can't build directly the port.


----------



## YuryG (Jan 15, 2017)

Have you tried to rebuild all (direct) dependencies: 
devel/boost-libs, textproc/libebml, multimedia/libmatroska, audio/libvorbis, audio/libogg,audio/flac for me. Or any recent changing of theirs options?
Since I have no trouble with multimedia/mkvtoolnix (had some in the deep past when tried to "optimize" build with different compiler options: boost and everything that uses it doesn't stand it at all).


----------



## talsamon (Jan 24, 2017)

This error appears if textproc/pugixml is installed.


----------



## talsamon (Jan 24, 2017)

I have made a PR PR 216445, with a possible solution (If I am right).

---
It seems conflicts with /usr/local/include/pugiconfig.hpp and /usr/local/include/pugixml.hpp which are installed by textproc/pugixml. With `CONFIGURE_ENV+= ac_cv_header_pugixml_hpp=no` it should take the internal headers.


----------



## talsamon (Jan 25, 2017)

Pleas, don't use above (CONFIGURE_ENV....) not as workaround. With this it uses the internal headers, bu it still links to textproc/pugixml.


----------



## talsamon (Jan 26, 2017)

Is fixed with this commit https://svnweb.freebsd.org/ports/he...x/Makefile?r1=432539&r2=432538&pathrev=432539


----------



## ssbear (Jan 28, 2017)

Thanks a lot, it's worked!


----------

