linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] Mac OS bundle not generating correctly: runnin


From: Álvaro Serrano
Subject: Re: [Linphone-developers] Mac OS bundle not generating correctly: running app displays no characters.
Date: Thu, 13 Dec 2012 13:54:38 +0100

Hello Laurent,

I think I found the source of the error. It is in bundler.py as I suspected. The latest patch (v0.7.3) of this file broke it for the pango version that is available on Macports. I don't know if it works with newer versions of pango (ironically, fixing pango was the whole reason for the patch) but I doubt it, the error is quite clear as you'll see in a moment.

The problem occurs in lines 78 and 105 of the file, when the module_version string is used. There's a "/" missing on the next word to be attached to the string.

The fragment is: 

        module_version = utils.evaluate_pkgconfig_variables("${pkg:pango:pango_module_version}")
        modulespath = self.project.get_bundle_path("Contents/Resources/lib/pango/" +
                                                   module_version +
                                                   "modules/")

Which produces an erroneous path : .Linphone.app/Contents/Resources/lib/pango/1.6.0modules/

It should be like this:

        module_version = utils.evaluate_pkgconfig_variables("${pkg:pango:pango_module_version}")
        modulespath = self.project.get_bundle_path("Contents/Resources/lib/pango/" +
                                                   module_version +
                                                   "/modules/")

Which produces the correct path: .Linphone.app/Contents/Resources/lib/pango/1.6.0/modules/

I have recreated the bundle and tested it on both my development Mac and the other one, and it worked flawlessly on both machines :D

I could submit a patch to the gtk-mac-bundler project but I have no idea how to do that.

Thank you very much again for your help, I couldn't have done it without you.

Álvaro.



El 13/12/2012, a las 11:01, Álvaro Serrano <address@hidden> escribió:

It worked! You are my hero Laurent, thanks! :D

I still don't know what is wrong exactly. Deleting that directory makes the bundled app run fine on my development machine, but if I then copy the bundle over to another Mac (without pango or even macports installed), and try to run it, the same problem occurs as before and there are no characters. 

I have tried deleting the directory and substituting it for the one in /opt/local/etc/pango and the same thing happens: it runs fine on the development Mac but not on the other one.

I have noticed that the script that creates and includes that directory in the bundle is located in gtk-mac-bundler/bundler/bundler.py. The file is attached in this message. There are some comments in the file saying that some versions of pango will not work properly. I would like to modify it to make sure that the bundle is generated correctly but I'm not sure what I need to do. Do you have any indications?

Thanks again, Laurent, this is definitely progress :)

Álvaro. 

<bundler.py>


El 12/12/2012, a las 21:23, Laurent Tarrisse <address@hidden> escribió:

If you remove Linphone.app/Contents/Resources/etc/pango ?

Laurent

Le 12 déc. 2012 à 19:21, Álvaro Serrano <address@hidden> a écrit :

Thanks very much for your help Laurent, I appreciate it.

I've tried that, as well as installing all the other dependencies with the -x11 option. 

Right now I have:

pango +no_x11 +quartz
cairo -x11 +quartz
gtk2 +no_x11 +quartz

The rest of the cairo dependencies (py27-cairo, py27-pygtk) also with the -x11 specifically negated (because the default variant is +x11)

I built everything and recreated the bundle, but still the same result. What's driving me crazy is the fact that the local app continues to works perfectly even after I reinstalled it. I have no idea what is going on here.

Álvaro.

El 12/12/2012, a las 19:06, Laurent Tarrisse <address@hidden> escribió:

Yes, there is a big bug with cairo Portfile ...

Try :  sudo port install cairo +quartz -x11

Laurent

Le 12 déc. 2012 à 17:16, Álvaro Serrano a écrit :

Thanks. I ran the command in both places and the list of libraries is exactly the same for both.

I also tried removing and reinstalling cairo, pango and gtk2 like you said, and the gtk2 installation fails. The command doesn't install the correct version of cairo, and installs the +x11 version instead:

$ sudo port -f install gtk2 +quartz +no_x11
--->  Computing dependencies for cairo
--->  Fetching archive for cairo
--->  Attempting to fetch cairo-1.12.8_2+x11.darwin_12.x86_64.tbz2 from http://lil.fr.packages.macports.org/cairo
--->  Attempting to fetch cairo-1.12.8_2+x11.darwin_12.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/cairo
--->  Installing cairo @1.12.8_2+x11
--->  Activating cairo @1.12.8_2+x11
--->  Cleaning cairo
--->  Computing dependencies for gtk2
--->  Dependencies to be installed: pango
--->  Fetching archive for pango
--->  Attempting to fetch pango-1.30.1_3+no_x11+quartz.darwin_12.x86_64.tbz2 from http://lil.fr.packages.macports.org/pango
--->  Attempting to fetch pango-1.30.1_3+no_x11+quartz.darwin_12.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/pango
--->  Attempting to fetch pango-1.30.1_3+no_x11+quartz.darwin_12.x86_64.tbz2 from http://packages.macports.org/pango
--->  Fetching distfiles for pango
--->  Verifying checksum(s) for pango
--->  Extracting pango
--->  Applying patches to pango
--->  Configuring pango
Error: To install pango with the quartz variant, cairo must be installed with the quartz variant.
Error: org.macports.configure for port pango returned: incompatible cairo installation
Error: Failed to install pango
Please see the log file for port pango for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_x11_pango/pango/main.log
Error: The following dependencies were not installed: pango
To report a bug, follow the instructions in the guide:
Error: Processing of port gtk2 failed


I'm curious because the +no_x11 variant is not listed for the cairo port in the MacPorts site. Cairo-devel on the other hand does have this variant. I'm going to try to reinstall them one by one using cairo-devel this time, see if that helps.

If you have any other suggestions please let me know.

Thanks a lot!
Álvaro.



El 12/12/2012, a las 16:48, Laurent Tarrisse <address@hidden> escribió:

Strange, if it works with local app, it should work with bundle ...

Did you verify that correct libraries has been placed in your bundle ?

take a look at :

otool -L /opt/local/bin/path_app_ok
and
otool -L bundle.app/Contents/MacOS/binary 

With the same command, test recursively libraries.



if you want to use quartz variant you should add no_x11 :

sudo port -f uninstall cairo pango gtk2
sudo port -f install gtk2 +quartz +no_x11 #(will install cairo and pango with correct variants too)


Laurent

Le 12 déc. 2012 à 15:27, Álvaro Serrano a écrit :

Hello Laurent, thanks for the answer.

I get the following response:

$ port installed | grep pango
  pango @1.30.1_3+quartz (active)

$ cat /opt/local/etc/macports/variants.conf
# To specify global variants to use for all port builds,
# customize this file to list variant settings you want.
#
# Any variants specified here that are not supported by
# a port will just be ignored. Multiple variants can be
# specified per line, or one per line is also allowed.
#
# Example:
# +ipv6 +no_x11


I think you're right and it's likely that pango is causing the error, but shouldn't it happen also in the local app in /opt/local and not just in the bundled one?

Should I edit the variants.conf file and then reinstall pango? Or simply reinstall pango with the +no_x11 option?

Thanks again,
Álvaro.

El 12/12/2012, a las 14:19, Laurent Tarrisse <address@hidden> escribió:

Hello,

Maybe a problem with pango …

Did you install port with +no_x11 variant ?

What is the result of :

port installed | grep pango

cat /opt/local/etc/macports/variants.conf

?

Laurent

Le 12 déc. 2012 à 12:43, Álvaro Serrano a écrit :

Well, even though Makefile.inc had some errors, it seems that it is not the source of the problem. See this fragment:

/opt/local/bin/gmkdir -p /Users/aserranor/Documents/linphone/linphone-install/opt/local/share/gnome/help/linphone/C/
cp -f ../../share/C/*.html /Users/aserranor/Documents/linphone/linphone-install//opt/local/share/gnome/help/linphone/C/
cp: ../../share/C/*.html: No such file or directory
make[4]: [install-data-local] Error 1 (ignored)
cp -f ../../share/C/*.css /Users/aserranor/Documents/linphone/linphone-install//opt/local/share/gnome/help/linphone/C/
cp: ../../share/C/*.css: No such file or directory
make[4]: [install-data-local] Error 1 (ignored)

The linphone/share/C directory where the html and css files are supposed to be is empty, which is the reason for the error above. However, the locally installed version of linphone (installed in /opt/local without using gtk-mac-bundler, simply with a 'sudo make install' terminal command) also has the same destination folder empty and it is still able to display text characters normally, so this seems unrelated to the bigger problem.

Could it be that GTK is looking for some libraries in the bundle and not finding them?
Any ideas? There's gotta be a reason for this:

<Captura de pantalla 2012-12-10 a la(s) 17.34.54.png>


Thanks,
Álvaro.



El 11/12/2012, a las 20:18, Álvaro Serrano <address@hidden> escribió:

All right, I was able to solve problem 2)

I followed the instructions here: http://ufoai.org/wiki/Compile_for_Mac

I basically added the -headerpad_max_install_names LDFLAGS option to the configuration script in MacPorts so that it is always used when installing new ports. I edited the file /opt/local/share/macports/Tcl/port1.0/portconfigure.tcl and changed the flag as it says on the URL above.

I then forced to recompile and reinstall all the ports and dependencies needed for linphone. The two main offenders were gtk2 and ffmpeg-devel but still, I reinstalled all of them just to be sure. Now gtk-mac-bundler is happy and the bundle is created without any of the errors that appeared before.


HOWEVER, I'm still stuck with problem 1) and I still get an app that doesn't show any characters other than squares. I will go over the Makefile.inc tomorrow in more detail, but if anyone has any pointers I would be more than grateful.

Álvaro.


El 10/12/2012, a las 18:48, Álvaro Serrano <address@hidden> escribió:

Hi,

I'm trying to create the Mac OS bundle with gtk-mac-bundler following the instructions in the readme.macos file. The bundle is created but when I run it this is what I get:

<Captura de pantalla 2012-12-10 a la(s) 17.34.54.png>

I've been looking through the logs in the terminal and I have found a couple of things:

1) There seems to be something wrong with the Makefile.inc file (attached for reference) located in the linphone/share directory that makes double dashes appear in the middle of some file paths, like this fragment from the terminal log during the make bundle command. I have noted one such path in bold for clarity:



Making install in C
 cd ../.. && /bin/sh /Users/aserranor/documents/linphone/missing --run automake-1.12 --gnu share/C/Makefile
configure.ac:109: warning: The 'AM_PROG_MKDIR_P' macro is deprecated, and will soon be removed.
configure.ac:109: You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead,
configure.ac:109: and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.
 cd ../.. && /bin/sh ./config.status share/C/Makefile 
config.status: creating share/C/Makefile
make[4]: Nothing to be done for `install-exec-am'.
/opt/local/bin/gmkdir -p /Users/aserranor/Documents/linphone/linphone-install/opt/local/share/gnome/help/linphone/C/
cp -f ../../share/C/*.html /Users/aserranor/Documents/linphone/linphone-install//opt/local/share/gnome/help/linphone/C//.
cp: ../../share/C/*.html: No such file or directory
make[4]: [install-data-local] Error 1 (ignored)
cp -f ../../share/C/*.css /Users/aserranor/Documents/linphone/linphone-install//opt/local/share/gnome/help/linphone/C//.
cp: ../../share/C/*.css: No such file or directory
make[4]: [install-data-local] Error 1 (ignored)
 /opt/local/bin/gmkdir -p '/Users/aserranor/Documents/linphone/linphone-install/opt/local/share/man/man1'
 /opt/local/bin/ginstall -c -m 644 linphone.1 linphonec.1 sipomatic.1 linphonecsh.1 '/Users/aserranor/Documents/linphone/linphone-install/opt/local/share/man/man1'
1 linphonec.1 sipomatic.1 linphonecsh.1 '/Users/aserranor/Documents/linphone/linphone-install/opt/local/share/man/man1'




This fragment is repeated for each of the subfolders in the share directory: C, cs, fr, it and ja. I have tried editing the Makefile.inc myself but I wasn't able to get it to work.

2) I also get a long and repeated error after that, here's a fragment:



Running install name tool
Going through prefix: /opt/local
install_name_tool: changing install names or rpaths can't be redone for: .Linphone.app/Contents/Resources/lib/libgtk-quartz-2.0.0.dylib (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
install_name_tool: changing install names or rpaths can't be redone for: .Linphone.app/Contents/Resources/lib/libgtk-quartz-2.0.0.dylib (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
install_name_tool: changing install names or rpaths can't be redone for: .Linphone.app/Contents/Resources/lib/libgtk-quartz-2.0.0.dylib (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
(...) 



It goes on and on like this for a while. I have no idea what this means. I would really appreciate any help guys, I'm lost at this point.

Thanks in advance.
Álvaro.


<Makefile.inc>
_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers

_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers

_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers

_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers

_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers

_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers

_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers

_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers

_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers

_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers

_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers


reply via email to

[Prev in Thread] Current Thread [Next in Thread]