Compilation Fails: find: xcodebuild...(fail) not found ...

Support for HandBrake on Linux, Solaris, and other Unix-like platforms
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Budgie
Posts: 31
Joined: Fri Jan 13, 2017 2:48 pm

Compilation Fails: find: xcodebuild...(fail) not found ...

Post by Budgie » Sat Jan 14, 2017 11:37 pm

Please detail your question or problem in as much detail as possible:

I am trying to build HandBrake-1.0.1 on openSUSE Leap 42.2. I have installed all the missing packages I can find on the openSUSE repo sites including packman but I am still getting errors.

The two logs I have are config.info.txt:-

Code: Select all

probe: host tuple...(pass) x86_64-unknown-linux-gnu
compute: available architectures...(pass) x86_64
find: ar...(pass) /usr/bin/ar
find: cp...(pass) /usr/bin/cp
find: gcc...(pass) /usr/bin/gcc
find: gmake...(pass) /usr/bin/gmake
find: gm4...(pass) /usr/bin/m4
find: mkdir...(pass) /usr/bin/mkdir
find: gpatch...(pass) /usr/bin/patch
find: rm...(pass) /usr/bin/rm
find: ranlib...(pass) /usr/bin/ranlib
find: strip...(pass) /usr/bin/strip
find: gtar...(pass) /bin/tar
find: yasm...(pass) /usr/bin/yasm
find: autoconf...(pass) /usr/bin/autoconf
find: automake...(pass) /usr/bin/automake
find: cmake...(pass) /usr/bin/cmake
find: libtool...(pass) /usr/bin/libtool
find: pkg-config...(pass) /usr/bin/pkg-config
find: xcodebuild...(fail) not found
find: lipo...(fail) not found
compute: build tuple...(pass) x86_64-unknown-linux-gnu
probe: number of CPU cores...(pass) 8
probe: repo info...(fail) code 128
probe: version.txt...(fail)
compute: project data...(pass) HandBrake (release)
version probe: yasm...(pass) 1.2.0
probe: strerror_r...(pass) end
compute: makevar SRC/    = ..
compute: makevar BUILD/  = .
compute: makevar PREFIX/ = /usr/local
mkdir: ./build
chdir: ./build
write: GNUmakefile
mkdir: project
write: project/handbrake.m4
write: distfile.cfg
and config.verbose.txt:-

Code: Select all

probe: host tuple...(pass) x86_64-unknown-linux-gnu
  + ./make/config.guess
  : x86_64-unknown-linux-gnu
compute: available architectures...(pass) x86_64
  : <NO-OUTPUT>
find: ar...(pass) /usr/bin/ar
  : name[0] = ar
find: cp...(pass) /usr/bin/cp
  : name[0] = cp
find: gcc...(pass) /usr/bin/gcc
  : name[0] = gcc
find: gmake...(pass) /usr/bin/gmake
  : name[0] = gmake
  : name[1] = make
find: gm4...(pass) /usr/bin/m4
  : name[0] = gm4
  : name[1] = m4
find: mkdir...(pass) /usr/bin/mkdir
  : name[0] = mkdir
find: gpatch...(pass) /usr/bin/patch
  : name[0] = gpatch
  : name[1] = patch
find: rm...(pass) /usr/bin/rm
  : name[0] = rm
find: ranlib...(pass) /usr/bin/ranlib
  : name[0] = ranlib
find: strip...(pass) /usr/bin/strip
  : name[0] = strip
find: gtar...(pass) /bin/tar
  : name[0] = gtar
  : name[1] = tar
find: yasm...(pass) /usr/bin/yasm
  : name[0] = yasm
find: autoconf...(pass) /usr/bin/autoconf
  : name[0] = autoconf
find: automake...(pass) /usr/bin/automake
  : name[0] = automake
find: cmake...(pass) /usr/bin/cmake
  : name[0] = cmake
find: libtool...(pass) /usr/bin/libtool
  : name[0] = libtool
find: pkg-config...(pass) /usr/bin/pkg-config
  : name[0] = pkg-config
find: xcodebuild...(fail) not found
  : name[0] = xcodebuild
find: lipo...(fail) not found
  : name[0] = lipo
compute: build tuple...(pass) x86_64-unknown-linux-gnu
  : <NO-OUTPUT>
probe: number of CPU cores...(pass) 8
  : <NO-OUTPUT>
probe: repo info...(fail) code 128
  + ./scripts/repo-info.sh .
  : fatal: Not a git repository (or any parent up to mount point /home)
  : Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
  : fatal: Not a git repository (or any parent up to mount point /home)
  : Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
  : Not a valid repository.
probe: version.txt...(fail)
compute: project data...(pass) HandBrake (release)
  : <NO-OUTPUT>
version probe: yasm...(pass) 1.2.0
  + /usr/bin/yasm --version
  : yasm 1.2.0
  : Copyright (c) 2001-2011 Peter Johnson and other Yasm developers.
  : Run yasm --license for licensing overview and summary.
probe: strerror_r...(pass) end
  + /usr/bin/gcc
  : <NO-OUTPUT>
compute: makevar SRC/    = ..
compute: makevar BUILD/  = .
compute: makevar PREFIX/ = /usr/local
mkdir: ./build
chdir: ./build
write: GNUmakefile
mkdir: project
write: project/handbrake.m4
write: distfile.cfg
mkdir: log
write: log/config.info.txt
write: log/config.verbose.txt
Out of my depth here with xcodebuild and lipo. Please can somebody guide me though this process.

Budgie

User avatar
Rodeo
HandBrake Team
Posts: 12046
Joined: Tue Mar 03, 2009 8:55 pm

Re: Compilation Fails: find: xcodebuild...(fail) not found ...

Post by Rodeo » Sun Jan 15, 2017 10:10 am

Those are only required under Mac OS X, so it's not your issue. Please post the HandBrake build log.

Budgie
Posts: 31
Joined: Fri Jan 13, 2017 2:48 pm

Re: Compilation Fails: find: xcodebuild...(fail) not found ...

Post by Budgie » Sun Jan 15, 2017 12:46 pm

Hi and thanks for the info. The files I quote are the only ones in the HandBrake-1.0.1/build/log directory and nothing I can see relevant in /var/log. Where else should I look please?
I did keep the text output from the attempt to compile, a rather large file at 1.2MiB. I can put it in dropbox but with whom should I share?
Regards,
Budge

User avatar
Rodeo
HandBrake Team
Posts: 12046
Joined: Tue Mar 03, 2009 8:55 pm

Re: Compilation Fails: find: xcodebuild...(fail) not found ...

Post by Rodeo » Sun Jan 15, 2017 1:43 pm

You can paste the link here.


User avatar
Rodeo
HandBrake Team
Posts: 12046
Joined: Tue Mar 03, 2009 8:55 pm

Re: Compilation Fails: find: xcodebuild...(fail) not found ...

Post by Rodeo » Sun Jan 15, 2017 6:11 pm

This is pretty weird -- it looks like libdvdread was built and installed successfully, but then pkg-config cannot find it. I'm baffled.

Budgie
Posts: 31
Joined: Fri Jan 13, 2017 2:48 pm

Re: Compilation Fails: find: xcodebuild...(fail) not found ...

Post by Budgie » Sun Jan 15, 2017 6:17 pm

If you need more info or for me to try anything to help fix this please let me know. I am in your hands.

User avatar
Rodeo
HandBrake Team
Posts: 12046
Joined: Tue Mar 03, 2009 8:55 pm

Re: Compilation Fails: find: xcodebuild...(fail) not found ...

Post by Rodeo » Sun Jan 15, 2017 7:40 pm

Nope, we just need someone smarter than me I'm afraid -- I'm hoping j45 will see this and have an idea.

Budgie
Posts: 31
Joined: Fri Jan 13, 2017 2:48 pm

Re: Compilation Fails: find: xcodebuild...(fail) not found ...

Post by Budgie » Thu Jan 19, 2017 12:15 pm

Hi Rodeo,
Any news on this problem? Did j45 have chance to look into it?
What is protocol for posting bugs?
Budgie

User avatar
JohnAStebbins
HandBrake Team
Posts: 5315
Joined: Sat Feb 09, 2008 7:21 pm

Re: Compilation Fails: find: xcodebuild...(fail) not found ...

Post by JohnAStebbins » Thu Jan 19, 2017 6:46 pm

I can't reproduce your problem. I installed a fresh openSuse Leap 42.2 in a VM. Then installed all the necessary dependencies (all that are available in the opensuse repo anyway, more on this later).

Code: Select all

sudo zypper install --type pattern devel_basis
sudo zypper install git-core libzip-devel cmake fontconfig-devel \
        freetype-devel fribidi-devel harfbuzz-devel libjansson-devel \
        libass-devel libogg-devel libvorbis-devel libsamplerate-devel \
        libtheora-devel libxml2-devel m4 make libopus-devel patch python \
        tar yasm zlib-devel gtk3-devel intltool dbus-1-glib-devel \
        gstreamer-devel gstreamer-plugins-base-devel libgudev-1_0-devel \
        libwebkitgtk3-devel libnotify-devel
Got a fresh clone of the HandBrake git repo

Code: Select all

git clone https://github.com/HandBrake/HandBrake.git
Since openSuse does not supply lame or x264, I modified a file to make HandBrake build these rather than searching for some unofficial build of these for Suse. The file to modify is HandBrake/make/include/main.defs. Here's the diff after changing

Code: Select all

diff --git a/make/include/main.defs b/make/include/main.defs
index a2ca1de..c9b5a04 100644
--- a/make/include/main.defs
+++ b/make/include/main.defs
@@ -56,10 +56,10 @@ ifneq (,$(filter $(BUILD.system),darwin cygwin mingw))
     MODULES += contrib/libopus
     MODULES += contrib/libtheora
     MODULES += contrib/libsamplerate
-    MODULES += contrib/lame
-    MODULES += contrib/x264
     MODULES += contrib/jansson
 endif
+    MODULES += contrib/lame
+    MODULES += contrib/x264
 
 ifeq (1,$(FEATURE.flatpak))
     MODULES += contrib/lame
Then I built it

Code: Select all

./configure --enable-fdk-aac
cd build
make
It all builds as expected...

Budgie
Posts: 31
Joined: Fri Jan 13, 2017 2:48 pm

Re: Compilation Fails: find: xcodebuild...(fail) not found ...

Post by Budgie » Thu Jan 19, 2017 10:37 pm

Hi John,
Many thanks and noted. All a bit over my head but I shall try and repeat with a new 42.2 installation.
The applications that are not on the official openSUSE repo site, particularly the multimedia stuff are usually installed from Packman community repo site and I had done this before trying to build Handbrake. It is possible an issue crept in here.
I will stay with the offical installation and do what you did and see if I can get it right that way.
As you will have seen, I am not a coder so may need a bit of guidance if I get stuck.
Meanwhile, many thanks again,
Alastair.

User avatar
JohnAStebbins
HandBrake Team
Posts: 5315
Joined: Sat Feb 09, 2008 7:21 pm

Re: Compilation Fails: find: xcodebuild...(fail) not found ...

Post by JohnAStebbins » Thu Jan 19, 2017 11:46 pm

I suspect it most likely has something to do with the package dependencies. One thing I did that you might have done differently is:

Code: Select all

sudo zypper install --type pattern devel_basis
This installs a collection of development related tools. I probably didn't need all of them, but it is a easy shortcut to get things going. You might want to just try doing that one thing on top of what you've already done and see if it changes behaviour.

Budgie
Posts: 31
Joined: Fri Jan 13, 2017 2:48 pm

Re: Compilation Fails: find: xcodebuild...(fail) not found ...

Post by Budgie » Fri Jan 20, 2017 4:55 pm

Hi and many thanks. I ran the above command and that installed a good number of tools. Then ran make again and got one error concerning libxml2. Checked my installation and the devel package was missing so installed that and got a bit further but still getting an error. Last few lines of build process are as follows:-

Code: Select all

-
Libraries have been installed in:
   /home/alastair/Downloads/HandBrake-1.0.1/build/contrib/lib64

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /usr/bin/mkdir -p '/home/alastair/Downloads/HandBrake-1.0.1/build/contrib/lib64/pkgconfig'
 /usr/bin/install -c -m 644 src/libbluray.pc '/home/alastair/Downloads/HandBrake-1.0.1/build/contrib/lib64/pkgconfig'
 /usr/bin/mkdir -p '/home/alastair/Downloads/HandBrake-1.0.1/build/contrib/include/libbluray'
 /usr/bin/install -c -m 644 src/file/filesystem.h src/libbluray/bluray.h src/libbluray/bluray-version.h src/libbluray/keys.h src/libbluray/player_settings.h src/libbluray/bdnav/clpi_data.h src/libbluray/bdnav/meta_data.h src/libbluray/decoders/overlay.h src/util/log_control.h '/home/alastair/Downloads/HandBrake-1.0.1/build/contrib/include/libbluray'
make[2]: Leaving directory '/home/alastair/Downloads/HandBrake-1.0.1/build/contrib/libbluray/libbluray-0.9.3'
make[1]: Leaving directory '/home/alastair/Downloads/HandBrake-1.0.1/build/contrib/libbluray/libbluray-0.9.3'
touch contrib/libbluray/.stamp.install
/usr/bin/gcc -std=gnu99 -pipe -fmessage-length=0 -Wall -g0 -O3 -mfpmath=sse -msse2 -DUSE_LIBAV_AAC -D__LIBHB__ -DUSE_PTHREAD -DSYS_LINUX -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_X265 -DHAS_STRERROR_R -DARCH_X86_64 -I./libhb/ -I./contrib/include -I/usr/include/libxml2 -c ../libhb/audio_resample.c -o libhb/audio_resample.o
In file included from ../libhb/common.h:14:0,
                 from ../libhb/audio_resample.c:10:
../libhb/hb_dict.h:13:21: fatal error: jansson.h: No such file or directory
 #include <jansson.h>
                     ^
compilation terminated.
../libhb/module.rules:12: recipe for target 'libhb/audio_resample.o' failed
make: *** [libhb/audio_resample.o] Error 1
ibmserver2:/home/alastair/Downloads/HandBrake-1.0.1/build # 
It is the fatal error that has lost me. Should I start over or try something else?
Thanks again for your help,
Budge

User avatar
JohnAStebbins
HandBrake Team
Posts: 5315
Joined: Sat Feb 09, 2008 7:21 pm

Re: Compilation Fails: find: xcodebuild...(fail) not found ...

Post by JohnAStebbins » Fri Jan 20, 2017 5:52 pm

your missing libjansson-devel. I suggest running ...

Code: Select all

sudo zypper install git-core libzip-devel cmake fontconfig-devel \
        freetype-devel fribidi-devel harfbuzz-devel libjansson-devel \
        libass-devel libogg-devel libvorbis-devel libsamplerate-devel \
        libtheora-devel libxml2-devel m4 make libopus-devel patch python \
        tar yasm zlib-devel gtk3-devel intltool dbus-1-glib-devel \
        gstreamer-devel gstreamer-plugins-base-devel libgudev-1_0-devel \
        libwebkitgtk3-devel libnotify-devel
... to fill in any other dependencies you may have missed.

Budgie
Posts: 31
Joined: Fri Jan 13, 2017 2:48 pm

Re: Compilation Fails: find: xcodebuild...(fail) not found ...

Post by Budgie » Fri Jan 20, 2017 11:10 pm

Hi John,
Installed this last bunch of tools and ran make. A very impressive process but not quite there it seems. My error this time is reported as follows:-

Code: Select all

-
Libraries have been installed in:
   /home/alastair/Downloads/HandBrake-1.0.1/build/contrib/lib64

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /usr/bin/mkdir -p '/home/alastair/Downloads/HandBrake-1.0.1/build/contrib/lib64/pkgconfig'
 /usr/bin/install -c -m 644 src/libbluray.pc '/home/alastair/Downloads/HandBrake-1.0.1/build/contrib/lib64/pkgconfig'
 /usr/bin/mkdir -p '/home/alastair/Downloads/HandBrake-1.0.1/build/contrib/include/libbluray'
 /usr/bin/install -c -m 644 src/file/filesystem.h src/libbluray/bluray.h src/libbluray/bluray-version.h src/libbluray/keys.h src/libbluray/player_settings.h src/libbluray/bdnav/clpi_data.h src/libbluray/bdnav/meta_data.h src/libbluray/decoders/overlay.h src/util/log_control.h '/home/alastair/Downloads/HandBrake-1.0.1/build/contrib/include/libbluray'
make[2]: Leaving directory '/home/alastair/Downloads/HandBrake-1.0.1/build/contrib/libbluray/libbluray-0.9.3'
make[1]: Leaving directory '/home/alastair/Downloads/HandBrake-1.0.1/build/contrib/libbluray/libbluray-0.9.3'
touch contrib/libbluray/.stamp.install
/usr/bin/gcc -std=gnu99 -pipe -fmessage-length=0 -Wall -g0 -O3 -mfpmath=sse -msse2 -DUSE_LIBAV_AAC -D__LIBHB__ -DUSE_PTHREAD -DSYS_LINUX -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_X265 -DHAS_STRERROR_R -DARCH_X86_64 -I./libhb/ -I./contrib/include -I/usr/include/libxml2 -c ../libhb/audio_resample.c -o libhb/audio_resample.o
/usr/bin/gcc -std=gnu99 -pipe -fmessage-length=0 -Wall -g0 -O3 -mfpmath=sse -msse2 -DUSE_LIBAV_AAC -D__LIBHB__ -DUSE_PTHREAD -DSYS_LINUX -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_X265 -DHAS_STRERROR_R -DARCH_X86_64 -I./libhb/ -I./contrib/include -I/usr/include/libxml2 -c ../libhb/opencl.c -o libhb/opencl.o
/usr/bin/gcc -std=gnu99 -pipe -fmessage-length=0 -Wall -g0 -O3 -mfpmath=sse -msse2 -DUSE_LIBAV_AAC -D__LIBHB__ -DUSE_PTHREAD -DSYS_LINUX -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_X265 -DHAS_STRERROR_R -DARCH_X86_64 -I./libhb/ -I./contrib/include -I/usr/include/libxml2 -c ../libhb/qsv_memory.c -o libhb/qsv_memory.o
/usr/bin/gcc -std=gnu99 -pipe -fmessage-length=0 -Wall -g0 -O3 -mfpmath=sse -msse2 -DUSE_LIBAV_AAC -D__LIBHB__ -DUSE_PTHREAD -DSYS_LINUX -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_X265 -DHAS_STRERROR_R -DARCH_X86_64 -I./libhb/ -I./contrib/include -I/usr/include/libxml2 -c ../libhb/encvorbis.c -o libhb/encvorbis.o
/usr/bin/gcc -std=gnu99 -pipe -fmessage-length=0 -Wall -g0 -O3 -mfpmath=sse -msse2 -DUSE_LIBAV_AAC -D__LIBHB__ -DUSE_PTHREAD -DSYS_LINUX -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_X265 -DHAS_STRERROR_R -DARCH_X86_64 -I./libhb/ -I./contrib/include -I/usr/include/libxml2 -c ../libhb/hb.c -o libhb/hb.o
In file included from ../libhb/hb.c:13:0:
../libhb/encx264.h:13:18: fatal error: x264.h: No such file or directory
 #include "x264.h"
                  ^
compilation terminated.
../libhb/module.rules:12: recipe for target 'libhb/hb.o' failed
make: *** [libhb/hb.o] Error 1
alastair@ibmserver2:~/Downloads/HandBrake-1.0.1/build> 
In your hands once more.
Many many thanks for your help.
Budge

User avatar
JohnAStebbins
HandBrake Team
Posts: 5315
Joined: Sat Feb 09, 2008 7:21 pm

Re: Compilation Fails: find: xcodebuild...(fail) not found ...

Post by JohnAStebbins » Sat Jan 21, 2017 12:36 am

This is the part where I said
Since openSuse does not supply lame or x264, I modified a file to make HandBrake build these rather than searching for some unofficial build of these for Suse. The file to modify is HandBrake/make/include/main.defs. Here's the diff after changing

Code: Select all

diff --git a/make/include/main.defs b/make/include/main.defs
index a2ca1de..c9b5a04 100644
--- a/make/include/main.defs
+++ b/make/include/main.defs
@@ -56,10 +56,10 @@ ifneq (,$(filter $(BUILD.system),darwin cygwin mingw))
     MODULES += contrib/libopus
     MODULES += contrib/libtheora
     MODULES += contrib/libsamplerate
-    MODULES += contrib/lame
-    MODULES += contrib/x264
     MODULES += contrib/jansson
 endif
+    MODULES += contrib/lame
+    MODULES += contrib/x264
 
 ifeq (1,$(FEATURE.flatpak))
     MODULES += contrib/lame

Budgie
Posts: 31
Joined: Fri Jan 13, 2017 2:48 pm

Re: Compilation Fails: find: xcodebuild...(fail) not found ...

Post by Budgie » Sat Jan 21, 2017 9:27 am

Sorry about this. I did say I was not a coder. Forgot to mention I was a bit dumb too! Do I run this as root or just as me and in which directory?

User avatar
JohnAStebbins
HandBrake Team
Posts: 5315
Joined: Sat Feb 09, 2008 7:21 pm

Re: Compilation Fails: find: xcodebuild...(fail) not found ...

Post by JohnAStebbins » Sat Jan 21, 2017 3:47 pm

Do you know how to use a text editor? It's basically a matter of moving a couple of lines of code down below the "endif" in that file. You also mentioned you are using pacman? You should be able to find the necessary packages there if you don't want to modify the file. I don't know the exact package names, but would be something like libx264-devel and liblame-devel (sometimes they leave off the "lib" prefix).

Budgie
Posts: 31
Joined: Fri Jan 13, 2017 2:48 pm

Re: Compilation Fails: find: xcodebuild...(fail) not found ...

Post by Budgie » Sat Jan 21, 2017 4:41 pm

Hi John,
Can use vi or vim and at first assumed that I was to insert your lines into the main.defs file but I couldn't work out where they went. I was looking for the relevant "if" to start the conditional statement to go with the endif. I think I see it now. As I said, not a coder.
So my first thoughts were correct just knowledge deficient.
I have found libx264-devel and installed from packman but not liblame-devel or lame-devel so I would like to use your code.

Here is last few lines of my edit of main.defs where I inserted your code after the last endif.

Code: Select all

ifeq (1,$(FEATURE.local_yasm))
    MODULES += contrib/yasm
endif

diff --git a/make/include/main.defs b/make/include/main.defs
index a2ca1de..c9b5a04 100644
--- a/make/include/main.defs
+++ b/make/include/main.defs
@@ -56,10 +56,10 @@ ifneq (,$(filter $(BUILD.system),darwin cygwin mingw))
     MODULES += contrib/libopus
     MODULES += contrib/libtheora
     MODULES += contrib/libsamplerate
-    MODULES += contrib/lame
-    MODULES += contrib/x264
     MODULES += contrib/jansson
 endif
+    MODULES += contrib/lame
+    MODULES += contrib/x264

 ifeq (1,$(FEATURE.flatpak))
     MODULES += contrib/lame

###############################################################################

MODULES += pkg

###############################################################################

include $(MODULES:%=$(SRC/)%/module.defs)
include $(SRC/)make/variant/$(BUILD.system).defs
-include $(SRC/)make/variant/$(BUILD.system).$(BUILD.machine).defs
When I run make now I get an error

Code: Select all

alastair@ibmserver2:~/Downloads/HandBrake-1.0.1/build> make
../make/include/main.defs:151: *** missing separator.  Stop.
Where did I go wrong?

User avatar
JohnAStebbins
HandBrake Team
Posts: 5315
Joined: Sat Feb 09, 2008 7:21 pm

Re: Compilation Fails: find: xcodebuild...(fail) not found ...

Post by JohnAStebbins » Sat Jan 21, 2017 5:37 pm

hehe, I assumed too much knowledge again :p

The example I posted is what's called a "diff". It shows what lines I moved by showing what was removed with '-' at the beginning of the line and where they were inserted with a '+' at the beginning of the line. So you weren't meant to copy that text literally. You just need to move the 2 lines that are preceded by '-' down to where the '+' signs indicate I moved them.

Budgie
Posts: 31
Joined: Fri Jan 13, 2017 2:48 pm

Re: Compilation Fails: find: xcodebuild...(fail) not found ...

Post by Budgie » Sat Jan 21, 2017 11:45 pm

Hi John,
OK. Understood and did it and ran make again. Different errors this time as follows:

Code: Select all

/include -I/usr/include/libxml2 -o HandBrakeCLI -Wl,--start-group test/test.o test/parsecsv.o ./libhb/libhandbrake.a -L./contrib/lib -lass -lavresample -lavformat -lavcodec -lavfilter -lavutil -lmp3lame -ldvdnav -ldvdread -lfontconfig -lfribidi -lsamplerate -lswscale -lvpx -ltheoraenc -ltheoradec -lvorbis -lvorbisenc -logg -lx264 -lbluray -lfreetype -lxml2 -lbz2 -lz -ljansson -lharfbuzz -lopus -lx265 -lpthread -ldl -lm -Wl,--end-group
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -ldvdnav
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lbluray
collect2: error: ld returned 1 exit status
../test/module.rules:33: recipe for target 'HandBrakeCLI' failed
make: *** [HandBrakeCLI] Error 1
alastair@ibmserver2:~/Downloads/HandBrake-1.0.1/build> 
I feel I am making progress and possibly learning a bit. Thank you for being so patient but I still cannot fly solo. It seems to me modules libdvdnav and libbluray are included. Are these the same as ldvdnav and lbluray? BTW what language is all this?
Grateful for further guidance please when you have time.

Budgie
Posts: 31
Joined: Fri Jan 13, 2017 2:48 pm

Re: Compilation Fails: find: xcodebuild...(fail) not found ...

Post by Budgie » Sun Jan 22, 2017 12:15 am

Hi John,
Checked my installation and the libdvdnav-devel and libbluray-devel were missing. Added these and make ran without any errors. Then went to sudo make install which gave me :-

Code: Select all

/usr/bin/cp ./HandBrakeCLI /usr/local/bin/HandBrakeCLI
make -C ./gtk/ prefix=/usr/local install
make[1]: Entering directory '/home/alastair/Downloads/HandBrake-1.0.1/build/gtk'
Making install in src
make[2]: Entering directory '/home/alastair/Downloads/HandBrake-1.0.1/build/gtk/src'
make[3]: Entering directory '/home/alastair/Downloads/HandBrake-1.0.1/build/gtk/src'
 /usr/bin/mkdir -p '/usr/local/bin'
  /bin/sh ../libtool   --mode=install /usr/bin/install -c ghb '/usr/local/bin'
libtool: install: /usr/bin/install -c ghb /usr/local/bin/ghb
for icon in hb-icon.svg ; do \
        mkdir -p //usr/local/share/icons/hicolor/scalable/apps/; \
        /usr/bin/install -c -m 644 /home/alastair/Downloads/HandBrake-1.0.1/build/../gtk/src/$icon //usr/local/share/icons/hicolor/scalable/apps/$icon; \
done
Updating Gtk icon cache.
gtk-update-icon-cache: Cache file created successfully.
mkdir -p //usr/local/share/applications/; \
/usr/bin/install -c -m 644 /home/alastair/Downloads/HandBrake-1.0.1/build/../gtk/src/ghb.desktop //usr/local/share/applications/ghb.desktop
make[3]: Leaving directory '/home/alastair/Downloads/HandBrake-1.0.1/build/gtk/src'
make[2]: Leaving directory '/home/alastair/Downloads/HandBrake-1.0.1/build/gtk/src'
Making install in po
make[2]: Entering directory '/home/alastair/Downloads/HandBrake-1.0.1/build/gtk/po'
linguas="cs da de es fr it_IT ja_JP ko no pt_BR ro_RO ru th zh_CN "; \
for lang in $linguas; do \
  dir=/usr/local/share/locale/$lang/LC_MESSAGES; \
  /bin/sh /home/alastair/Downloads/HandBrake-1.0.1/gtk/install-sh -d $dir; \
  if test -r $lang.gmo; then \
    /usr/bin/install -c -m 644 $lang.gmo $dir/ghb.mo; \
    echo "installing $lang.gmo as $dir/ghb.mo"; \
  else \
    /usr/bin/install -c -m 644 /home/alastair/Downloads/HandBrake-1.0.1/build/../gtk/po/$lang.gmo $dir/ghb.mo; \
    echo "installing /home/alastair/Downloads/HandBrake-1.0.1/build/../gtk/po/$lang.gmo as" \
         "$dir/ghb.mo"; \
  fi; \
  if test -r $lang.gmo.m; then \
    /usr/bin/install -c -m 644 $lang.gmo.m $dir/ghb.mo.m; \
    echo "installing $lang.gmo.m as $dir/ghb.mo.m"; \
  else \
    if test -r /home/alastair/Downloads/HandBrake-1.0.1/build/../gtk/po/$lang.gmo.m ; then \
      /usr/bin/install -c -m 644 /home/alastair/Downloads/HandBrake-1.0.1/build/../gtk/po/$lang.gmo.m \
        $dir/ghb.mo.m; \
      echo "installing /home/alastair/Downloads/HandBrake-1.0.1/build/../gtk/po/$lang.gmo.m as" \
           "$dir/ghb.mo.m"; \
    else \
      true; \
    fi; \
  fi; \
done
installing cs.gmo as /usr/local/share/locale/cs/LC_MESSAGES/ghb.mo
installing da.gmo as /usr/local/share/locale/da/LC_MESSAGES/ghb.mo
installing de.gmo as /usr/local/share/locale/de/LC_MESSAGES/ghb.mo
installing es.gmo as /usr/local/share/locale/es/LC_MESSAGES/ghb.mo
installing fr.gmo as /usr/local/share/locale/fr/LC_MESSAGES/ghb.mo
installing it_IT.gmo as /usr/local/share/locale/it_IT/LC_MESSAGES/ghb.mo
installing ja_JP.gmo as /usr/local/share/locale/ja_JP/LC_MESSAGES/ghb.mo
installing ko.gmo as /usr/local/share/locale/ko/LC_MESSAGES/ghb.mo
installing no.gmo as /usr/local/share/locale/no/LC_MESSAGES/ghb.mo
installing pt_BR.gmo as /usr/local/share/locale/pt_BR/LC_MESSAGES/ghb.mo
installing ro_RO.gmo as /usr/local/share/locale/ro_RO/LC_MESSAGES/ghb.mo
installing ru.gmo as /usr/local/share/locale/ru/LC_MESSAGES/ghb.mo
installing th.gmo as /usr/local/share/locale/th/LC_MESSAGES/ghb.mo
installing zh_CN.gmo as /usr/local/share/locale/zh_CN/LC_MESSAGES/ghb.mo
make[2]: Leaving directory '/home/alastair/Downloads/HandBrake-1.0.1/build/gtk/po'
make[2]: Entering directory '/home/alastair/Downloads/HandBrake-1.0.1/build/gtk'
make[3]: Entering directory '/home/alastair/Downloads/HandBrake-1.0.1/build/gtk'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/home/alastair/Downloads/HandBrake-1.0.1/build/gtk'
make[2]: Leaving directory '/home/alastair/Downloads/HandBrake-1.0.1/build/gtk'
make[1]: Leaving directory '/home/alastair/Downloads/HandBrake-1.0.1/build/gtk'
alastair@ibmserver2:~/Downloads/HandBrake-1.0.1/build> 
This looks good to me but I have not yet found how to run it. No GUI version and although there is a large executable file HandBrakeCLI sitting in my build subdirectory it doesn't want to run. Tried thus:-

Code: Select all

alastair@ibmserver2:~/Downloads/HandBrake-1.0.1/build> ./HandBrakeCLI
[00:09:58] hb_init: starting libhb thread
[00:09:58] thread 7fabf3ae1700 started ("libhb")
Missing input device. Run ./HandBrakeCLI --help for syntax.
alastair@ibmserver2:~/Downloads/HandBrake-1.0.1/build> 
I guess I am still at the bottom of the class.

User avatar
JohnAStebbins
HandBrake Team
Posts: 5315
Joined: Sat Feb 09, 2008 7:21 pm

Re: Compilation Fails: find: xcodebuild...(fail) not found ...

Post by JohnAStebbins » Sun Jan 22, 2017 4:16 pm

You should not have needed to install dvdnav or bluray. HandBrake builds both of those. But it seems you got past that somehow.

There are various languages involved in the build system and the actual code. The configure script is written in Python. Some of the macros used are generated with M4 (version numbers and such). Much of the build system are just "Make" files (e.g. make/include/main.defs is a fragment of a make file that gets included by the main make file build/GNUmakefile that is generated by configure). The core of HandBrake (libhb), HandBrakeCLI, and the Linux GUI are all written in C. The windows GUI is C# and the OSX GUI is Objective C. The other libraries HandBrake uses are written mostly in C, C++, and hand coded assembly for speed critical parts of encoders and decoders.

The executable for the Linux GUI is "ghb". It got installed in /usr/local/bin. You'll also find it in a subdirectory of your build directory, build/gtk/src/ghb. HandBrakeCLI is the command line version. You have to tell it everything you want to do on the command line (HandBrakeCLI --help to see all the available options).

Budgie
Posts: 31
Joined: Fri Jan 13, 2017 2:48 pm

Re: Compilation Fails: find: xcodebuild...(fail) not found ...

Post by Budgie » Sun Jan 22, 2017 6:48 pm

Hi John,
It did and it works. Many many thanks for helping me with this, for putting up with my ignorance and also for the brief tutorials. I owe you a bottle of wine.
One last question:-

You said at the start you built HandBrake in an openSUSE VM. How on earth did all the additional required libraries get installed on that VM version or did you know what was required and install them at the start?

Many thanks once more.
Budge

User avatar
JohnAStebbins
HandBrake Team
Posts: 5315
Joined: Sat Feb 09, 2008 7:21 pm

Re: Compilation Fails: find: xcodebuild...(fail) not found ...

Post by JohnAStebbins » Mon Jan 23, 2017 4:47 pm

The required dependencies are all documented for other Linux platforms in our documentation. I just had to search for the equivalent packages on Suse and install them.

I gave a list of all additional packages I installed in an earlier post. Here it is again if you missed it.

Code: Select all

sudo zypper install --type pattern devel_basis
sudo zypper install git-core libzip-devel cmake fontconfig-devel \
        freetype-devel fribidi-devel harfbuzz-devel libjansson-devel \
        libass-devel libogg-devel libvorbis-devel libsamplerate-devel \
        libtheora-devel libxml2-devel m4 make libopus-devel patch python \
        tar yasm zlib-devel gtk3-devel intltool dbus-1-glib-devel \
        gstreamer-devel gstreamer-plugins-base-devel libgudev-1_0-devel \
        libwebkitgtk3-devel libnotify-devel

Post Reply