Page 1 of 9

Can't compile mrmc on Xcode 7.1

Posted: 09 Dec 2015, 22:10
by TheJmc
Hi,

I'm trying to compile the 1.0.1 github branch for tvOS, but I'm encountering several issues.

First one: Project is missing an info.plist file to add my provisions.
When fixed/done, another issue comes up.

Lots of includes and other files are missing in the project (though they are present in their respective folders) and I have to manually add them.

Is it normal?

Thanks for your help.

Re: Can't compile mrmc on Xcode 7.1

Posted: 09 Dec 2015, 22:28
by davilla
Info.plist is created when you configure as are the other files. You are doing something very wrong.

Self building is a three step process
1) build depends (see tools/depends/README
2) build xcode depends (see docs/README.ios)
3) then and only then can you build in Xcode.

This is the same process as how XBMC/Kodi is built.

WARNING: do NOT update to Xcode7.2, Apple has marked a few more routines as tvos_prohibited in 9.1 SDK.

Re: Can't compile mrmc on Xcode 7.1

Posted: 09 Dec 2015, 22:47
by TheJmc
davilla wrote:Self building is a three step process
1) build depends (see tools/depends/README
2) build xcode depends (see docs/README.ios)
3) then and only then can you build in Xcode.
Guess I was too hurry... :oops:
davilla wrote:WARNING: do NOT update to Xcode7.2, Apple has marked a few more routines as tvos_prohibited in 9.1 SDK.
Thanks a lot, it was downloading when I read this. Paused right away. :mrgreen:

Re: Can't compile mrmc on Xcode 7.1

Posted: 09 Dec 2015, 22:59
by davilla
Just keep this in mind, MrMC is big, really big. It's not your typical iOS app where xcode does it all. Everything is build from scratch, including all of the 20+ libs we use.

Re: Can't compile mrmc on Xcode 7.1

Posted: 10 Dec 2015, 02:06
by TheJmc
I followed the whole steps and it still fails to compile... :(

OSX 10.11.1 / Xcode 7.1.1

1 - Getting MrMC

Code: Select all

cd $HOME
git clone git://github.com/mrmc/mrmc.git MrMC
Download is fine, no error so far.

2 - Installing Cross libs and runtime environment

Code: Select all

cd $HOME/MrMC
cd tools/depends
./bootstrap
./configure --host=arm-apple-darwin --with-cpu=arm64 --with-platform=tvos
Everything goes fine, until I type the following

Code: Select all

make
for which I get the following error:
touch .installed-x86_64-osx-native
make: *** [native/.installed-x86_64-osx-native] Error 2
Any idea? :|

Re: Can't compile mrmc on Xcode 7.1

Posted: 10 Dec 2015, 03:09
by davilla
need to see a few lines before that. those will show the real error.

Re: Can't compile mrmc on Xcode 7.1

Posted: 10 Dec 2015, 09:46
by TheJmc
davilla wrote:need to see a few lines before that. those will show the real error.
There are thousands of lines before that, so I' just gonna paste the lasts errors.

Code: Select all

checking for SQUISH... no
no
checking whether readlink signature is correct... configure: error: "libsquish not found"
make[2]: *** [x86_64-osx-native] Error 1
make[1]: *** [TexturePacker] Error 2
make[1]: yes

Code: Select all

libxml/uri.c:744:33: warning: while loop has empty body [-Wempty-body]
        while ((*tmp++ = *segp++) != 0);
                                       ^

Code: Select all

libxml/tree.c:4851:10: warning: passing 'const xmlChar *' (aka 'const unsigned char *') to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        xmlFree(fixed);
                ^~~~~
1 warning generated.

Code: Select all

m-fgrep.c:109:33: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
        error (exit_failure, 0, err);
                                ^~~
m-fgrep.c:117:29: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
    error (exit_failure, 0, err);
                            ^~~
2 warnings generated.
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I../gnulib-lib -I../gnulib-lib -I../intl -DIN_GETTEXT_TOOLS_LIBGREP=1 -I/Users/Shared/xbmc-depends/buildtools-native/include   -I/Users/Shared/xbmc-depends/buildtools-native/include  -c m-regex.c
m-regex.c:109:35: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
          error (exit_failure, 0, err);
                                  ^~~
1 warning generated.
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I../gnulib-lib -I../gnulib-lib -I../intl -DIN_GETTEXT_TOOLS_LIBGREP=1 -I/Users/Shared/xbmc-depends/buildtools-native/include   -I/Users/Shared/xbmc-depends/buildtools-native/include  -c regex.c
Linking CXX executable runcompilecommands
[ 84%] In file included from regex.c:66:
./regex_internal.h:40:10: warning: '__libc_lock_define' macro redefined [-Wmacro-redefined]
# define __libc_lock_define(CLASS,NAME)
         ^
../config.h:2592:9: note: previous definition is here
#define __libc_lock_define              gl_lock_define
        ^
In file included from regex.c:66:
./regex_internal.h:41:10: warning: '__libc_lock_init' macro redefined [-Wmacro-redefined]
# define __libc_lock_init(NAME) do { } while (0)
         ^
../config.h:2594:9: note: previous definition is here
Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPackLog.cxx.o
#define __libc_lock_init                gl_lock_init
        ^
In file included from regex.c:66:
./regex_internal.h:42:10: warning: '__libc_lock_lock' macro redefined [-Wmacro-redefined]
# define __libc_lock_lock(NAME) do { } while (0)
         ^
../config.h:2595:9: note: previous definition is here
#define __libc_lock_lock                gl_lock_lock
        ^
In file included from regex.c:66:
./regex_internal.h:43:10: warning: '__libc_lock_unlock' macro redefined [-Wmacro-redefined]
# define __libc_lock_unlock(NAME) do { } while (0)
         ^
../config.h:2596:9: note: previous definition is here
#define __libc_lock_unlock              gl_lock_unlock
        ^
In file included from regex.c:68:
./regex_internal.c:1396:11: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
  if (idx < 0 || idx >= set->nelem)
      ~~~ ^ ~

Code: Select all

../src/po-lex.c:241:21: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
    return (mbc->uc >= 0x0000 && mbc->uc <= 0x007F);
            ~~~~~~~ ^  ~~~~~~
../src/po-lex.c:273:14: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
      if (uc >= 0x0000 && uc <= 0x001F)
          ~~ ^  ~~~~~~
2 warnings generated.

Code: Select all

warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm: no name list
error.c:381:12: warning: data argument not used by format string [-Wformat-extra-args]
           file_name, line_number);
           ^
1 warning generated.

Code: Select all

../src/po-lex.c:241:21: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
    return (mbc->uc >= 0x0000 && mbc->uc <= 0x007F);
            ~~~~~~~ ^  ~~~~~~
../src/po-lex.c:273:14: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
      if (uc >= 0x0000 && uc <= 0x001F)
          ~~ ^  ~~~~~~

Code: Select all

error.c:381:12: warning: data argument not used by format string [-Wformat-extra-args]
           file_name, line_number);
           ^
1 warning generated.


In the [https://github.com/MrMC/mrmc/tree/mrmc- ... 1.0.1/docs] it says

Code: Select all

a. When building on Mac OSX you should download the java version from here: http://support.apple.com/kb/DL1572
Or ensure otherwise that you are using java 1.6 (java -version tells you the version).
I installed java 1.6, but if I check the current version in the terminal it says

Code: Select all

Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)

Re: Can't compile mrmc on Xcode 7.1

Posted: 10 Dec 2015, 10:09
by A.Coward
Just wanted to mention that I was able to compile the dependencies (depends and Xcode depends). I do not yet have a USB-C cable so I was not able to proceed with building MrMC using Xcode (getting a "No Devices Registered" error).

I did, however, run into one problem which needed fixing:

"tools/depends/target/pcre" would not build because the Makefile is trying to download "pcre-8.36.tar.gz" from a URL which no longer exists (I guess it may have been removed). I changed BASE_URL in the Makefile to "http://ftp.cs.stanford.edu/pub/exim/pcre/" and things went through fine.

Re: Can't compile mrmc on Xcode 7.1

Posted: 10 Dec 2015, 10:39
by TheJmc
A.Coward wrote:Just wanted to mention that I was able to compile the dependencies (depends and Xcode depends). I do not yet have a USB-C cable so I was not able to proceed with building MrMC using Xcode (getting a "No Devices Registered" error).

I did, however, run into one problem which needed fixing:

"tools/depends/target/pcre" would not build because the Makefile is trying to download "pcre-8.36.tar.gz" from a URL which no longer exists (I guess it may have been removed). I changed BASE_URL in the Makefile to "http://ftp.cs.stanford.edu/pub/exim/pcre/" and things went through fine.
Thanks for the tips. It solved my issue ;)

Code: Select all

touch .installed-appletvos9.0_arm64-target
touch .installed-appletvos9.0_arm64-target
Dependencies built successfully.
Can you tell me which Java Runtime Environment is running on your system?

Code: Select all

java -version

Re: Can't compile mrmc on Xcode 7.1

Posted: 10 Dec 2015, 13:24
by davilla
You don't need to install java, legacy stuff that has been removed. You might get some dialogs to install it when making depends, ignore them. some libs configure is testing for java for silly reasons.

Yes, we know about pcre-8.36.tar.gz, silly site removed the older versions which they should not be doing. This will get moved to our servers so as not to happen again.