Author [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: 200 PTS - Mac OS X Keyhotee Packaging Script [PAID]  (Read 4035 times)

0 Members and 1 Guest are viewing this topic.

Offline bytemaster

200 PTS - Mac OS X Keyhotee Packaging Script [PAID]
« on: January 04, 2014, 03:41:42 PM »

Bundling a .app into a distributable .dmg file involves many steps after compiling it.  I would like a script that I can run that will package a working executable on demand.  It should be robust.

Currenty the macdeployqt tool provided with Qt 5.1.1 does not properly include all libraries and then the .app crashes when attempting to load Image plugins after I attempt to bundle it.  It works if I just compile it.

« Last Edit: January 28, 2014, 08:48:06 PM by bytemaster »
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline toast

Re: 50 PTS - Mac OS X Keyhotee Packaging Script [ACTIVE]
« Reply #1 on: January 04, 2014, 04:15:30 PM »
Check it:

https://github.com/LinusU/node-appdmg

Gonna give it a crack once I'm done playing with keyhotee
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline toast

Re: 50 PTS - Mac OS X Keyhotee Packaging Script [ACTIVE]
« Reply #2 on: January 04, 2014, 08:03:55 PM »
What the fuck?

Code: [Select]
/Users/nikolai/projects/keyhotee/miner/server.cpp: In member function 'void server::send_work(const connection_data&, const bitcoin::work&)':
/Users/nikolai/projects/keyhotee/miner/server.cpp:352:5: internal compiler error: in calc_dfs_tree, at dominance.c:401
     }
     ^

/Users/nikolai/projects/keyhotee/miner/server.cpp:352:5: internal compiler error: Abort trap: 6
c++: internal compiler error: Abort trap: 6 (program cc1plus)

(side note: found a better dmg making script here https://github.com/remko/fancy-dmg/)
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline bytemaster

Re: 50 PTS - Mac OS X Keyhotee Packaging Script [ACTIVE]
« Reply #3 on: January 04, 2014, 08:23:36 PM »
What the fuck?

Code: [Select]
/Users/nikolai/projects/keyhotee/miner/server.cpp: In member function 'void server::send_work(const connection_data&, const bitcoin::work&)':
/Users/nikolai/projects/keyhotee/miner/server.cpp:352:5: internal compiler error: in calc_dfs_tree, at dominance.c:401
     }
     ^

/Users/nikolai/projects/keyhotee/miner/server.cpp:352:5: internal compiler error: Abort trap: 6
c++: internal compiler error: Abort trap: 6 (program cc1plus)

(side note: found a better dmg making script here https://github.com/remko/fancy-dmg/)

The DMG part is easy, the .app bundle that is portable is hard.  Does fancy-dmg do that?

Crazy on the internal compiler error... what version of g++ are you using?
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline bytemaster

Re: 150 PTS - Mac OS X Keyhotee Packaging Script [ACTIVE]
« Reply #4 on: January 06, 2014, 01:40:05 AM »
I have tripled the bounty on this with the expectation that a Mac version of Keyhotee should be produced. 

I need to focus on BitShares so this needs to be delegated to the community.  There are people that are close so we have the skills in the community.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline darren

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: 150 PTS - Mac OS X Keyhotee Packaging Script [ACTIVE]
« Reply #5 on: January 06, 2014, 03:36:13 PM »

make errors...
g++ versions:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix

Code: [Select]
In file included from /Users/xhb/GitHub/keyhotee/BitShares/include/bts/network/channel_id.hpp:76:
In file included from /Users/xhb/GitHub/keyhotee/BitShares/fc/include/fc/reflect/reflect.hpp:9:
In file included from /Users/xhb/GitHub/keyhotee/BitShares/fc/include/fc/utility.hpp:3:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/new:56:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/exception:81:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:770:38: error:
      implicit instantiation of undefined template 'std::__1::hash<fc::ip::endpoint>'
    : public integral_constant<bool, __is_empty(_Tp)> {};
                                     ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/unordered_map:327:54: note:
      in instantiation of template class 'std::__1::is_empty<std::__1::hash<fc::ip::endpoint> >' requested here
template <class _Key, class _Tp, class _Hash, bool = is_empty<_Hash>::value
                                                     ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/unordered_map:678:13: note:
      in instantiation of default argument for '__unordered_map_hasher<fc::ip::endpoint,
      std::__1::shared_ptr<bts::network::connection>, std::__1::hash<fc::ip::endpoint> >' required here
    typedef __unordered_map_hasher<key_type, mapped_type, hasher>   __hasher;
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/xhb/GitHub/keyhotee/BitShares/src/network/server.cpp:63:71: note: in instantiation of template class
      'std::__1::unordered_map<fc::ip::endpoint, std::__1::shared_ptr<bts::network::connection>, std::__1::hash<fc::ip::endpoint>,
      std::__1::equal_to<fc::ip::endpoint>, std::__1::allocator<std::__1::pair<const fc::ip::endpoint,
      std::__1::shared_ptr<bts::network::connection> > > >' requested here
          std::unordered_map<fc::ip::endpoint,connection_ptr>         connections;
                                                                      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:3081:29: note:
      template is declared here
template <class _Tp> struct hash;
                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:2147:15: error: no
      matching constructor for initialization of 'bts::network::connection'
              __second_(_VSTD::forward<_Args2>(get<_I2>(__second_args))...)
PTS: PvssATbmJSQWFrwnWm2JeyX13UdTHNpuk5

Offline bytemaster

Re: 150 PTS - Mac OS X Keyhotee Packaging Script [ACTIVE]
« Reply #6 on: January 06, 2014, 03:44:56 PM »
g++ 4.8 required
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline toast

Re: 150 PTS - Mac OS X Keyhotee Packaging Script [ACTIVE]
« Reply #7 on: January 06, 2014, 04:05:17 PM »

make errors...
g++ versions:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix

Code: [Select]
In file included from /Users/xhb/GitHub/keyhotee/BitShares/include/bts/network/channel_id.hpp:76:
In file included from /Users/xhb/GitHub/keyhotee/BitShares/fc/include/fc/reflect/reflect.hpp:9:
In file included from /Users/xhb/GitHub/keyhotee/BitShares/fc/include/fc/utility.hpp:3:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/new:56:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/exception:81:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:770:38: error:
      implicit instantiation of undefined template 'std::__1::hash<fc::ip::endpoint>'
    : public integral_constant<bool, __is_empty(_Tp)> {};
                                     ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/unordered_map:327:54: note:
      in instantiation of template class 'std::__1::is_empty<std::__1::hash<fc::ip::endpoint> >' requested here
template <class _Key, class _Tp, class _Hash, bool = is_empty<_Hash>::value
                                                     ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/unordered_map:678:13: note:
      in instantiation of default argument for '__unordered_map_hasher<fc::ip::endpoint,
      std::__1::shared_ptr<bts::network::connection>, std::__1::hash<fc::ip::endpoint> >' required here
    typedef __unordered_map_hasher<key_type, mapped_type, hasher>   __hasher;
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/xhb/GitHub/keyhotee/BitShares/src/network/server.cpp:63:71: note: in instantiation of template class
      'std::__1::unordered_map<fc::ip::endpoint, std::__1::shared_ptr<bts::network::connection>, std::__1::hash<fc::ip::endpoint>,
      std::__1::equal_to<fc::ip::endpoint>, std::__1::allocator<std::__1::pair<const fc::ip::endpoint,
      std::__1::shared_ptr<bts::network::connection> > > >' requested here
          std::unordered_map<fc::ip::endpoint,connection_ptr>         connections;
                                                                      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:3081:29: note:
      template is declared here
template <class _Tp> struct hash;
                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:2147:15: error: no
      matching constructor for initialization of 'bts::network::connection'
              __second_(_VSTD::forward<_Args2>(get<_I2>(__second_args))...)

OSX silently links g++ and gcc to clang
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline darren

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: 150 PTS - Mac OS X Keyhotee Packaging Script [ACTIVE]
« Reply #8 on: January 06, 2014, 05:51:25 PM »
oh!  errors again
version: c++ (GCC) 4.8.2

Code: [Select]
Linking CXX executable bin/Keyhotee.app/Contents/MacOS/Keyhotee
Undefined symbols for architecture x86_64:
  "fc::time_point::from_iso_string(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
      bts::bitname::create_genesis_block()     in libbshare.a(bitname_block.cpp.o)
  "fc::to_variant(std::vector<char, std::allocator<char> > const&, fc::variant&)", referenced from:
      void fc::to_variant<bts::addressbook::contact_property>(std::vector<bts::addressbook::contact_property, std::allocator<bts::addressbook::contact_property> > const&, fc::variant&) in Contact.cpp.o
      void fc::reflector<bts::addressbook::wallet_contact>::visit<fc::to_variant_visitor<bts::addressbook::wallet_contact> >(fc::to_variant_visitor<bts::addressbook::wallet_contact> const&) in Contact.cpp.o
      void fc::to_variant<bts::addressbook::contact_property>(std::vector<bts::addressbook::contact_property, std::allocator<bts::addressbook::contact_property> > const&, fc::variant&) in KeyhoteeMainWindow.cpp.o
      void fc::to_variant<bts::addressbook::wallet_identity>(std::vector<bts::addressbook::wallet_identity, std::allocator<bts::addressbook::wallet_identity> > const&, fc::variant&) in KeyhoteeMainWindow.cpp.o
      fc::mutable_variant_object& fc::mutable_variant_object::operator()<std::vector<char, std::allocator<char> > const&>(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<char, std::allocator<char> > const&) in libbshare.a(addressbook.cpp.o)
      void fc::to_variant<bts::addressbook::contact_property>(std::vector<bts::addressbook::contact_property, std::allocator<bts::addressbook::contact_property> > const&, fc::variant&) in libbshare.a(addressbook.cpp.o)
      void fc::reflector<bts::addressbook::wallet_contact>::visit<fc::to_variant_visitor<bts::addressbook::wallet_contact> >(fc::to_variant_visitor<bts::addressbook::wallet_contact> const&) in libbshare.a(addressbook.cpp.o)
      ...
  "fc::aes_decrypt(fc::sha512 const&, std::vector<char, std::allocator<char> > const&)", referenced from:
      bts::addressbook::addressbook::open(fc::path const&, fc::sha512 const&) in libbshare.a(addressbook.cpp.o)
      bts::bitchat::encrypted_message::decrypt(fc::ecc::private_key const&, bts::bitchat::decrypted_message&) const in libbshare.a(bitchat_private_message.cpp.o)
  "fc::aes_encrypt(fc::sha512 const&, std::vector<char, std::allocator<char> > const&)", referenced from:
      bts::addressbook::addressbook::store_contact(bts::addressbook::wallet_contact const&) in libbshare.a(addressbook.cpp.o)
      bts::bitchat::decrypted_message::encrypt(fc::ecc::public_key const&) const in libbshare.a(bitchat_private_message.cpp.o)
PTS: PvssATbmJSQWFrwnWm2JeyX13UdTHNpuk5

Offline toast

Re: 150 PTS - Mac OS X Keyhotee Packaging Script [ACTIVE]
« Reply #9 on: January 06, 2014, 06:02:47 PM »
show us your gcc --version
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline toast

Re: 150 PTS - Mac OS X Keyhotee Packaging Script [ACTIVE]
« Reply #10 on: January 06, 2014, 07:22:14 PM »
nvm, read your post more carefully

try deleting the whole repo, re-downloading, and building again. Probably not the "right" way to do it but it has worked for me before
cmake's caching sucks
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline toast

Re: 150 PTS - Mac OS X Keyhotee Packaging Script [ACTIVE]
« Reply #11 on: January 06, 2014, 10:34:08 PM »
Aha! Compilation successful, make install successful & keyhotee running after tackling the libpng issues.

bytemaster, try

Code: [Select]
brew uninstall qt5
brew install libpng
brew install qt5 --without-x11

then delete CMakeCache/CMakeFiles and redo everything

This should link in homebrew's libpng and remove the dependency on x11
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline bytemaster

Re: 150 PTS - Mac OS X Keyhotee Packaging Script [ACTIVE]
« Reply #12 on: January 06, 2014, 10:41:35 PM »
Aha! Compilation successful, make install successful & keyhotee running after tackling the libpng issues.

bytemaster, try

Code: [Select]
brew uninstall qt5
brew install libpng
brew install qt5 --without-x11

then delete CMakeCache/CMakeFiles and redo everything

This should link in homebrew's libpng and remove the dependency on x11

Looks like you are but one small step away from winning this bounty... write a script and provide a download link to a OS X Keyhotee.dmg file :)
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline toast

Re: 150 PTS - Mac OS X Keyhotee Packaging Script [ACTIVE]
« Reply #13 on: January 06, 2014, 10:45:22 PM »
What exactly should this script do? The fix appears to be to rebuild your local qt installation with a particular flag.
edit: do you mean the script to put the app into a nice .dmg?

I can package up my local .app and we can test if it's portable
« Last Edit: January 06, 2014, 10:50:19 PM by toast »
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline bytemaster

Re: 150 PTS - Mac OS X Keyhotee Packaging Script [ACTIVE]
« Reply #14 on: January 06, 2014, 10:54:07 PM »
What exactly should this script do? The fix appears to be to rebuild your local qt installation with a particular flag.
edit: do you mean the script to put the app into a nice .dmg?

I can package up my local .app and we can test if it's portable

Correct, when you just compile the .app (something I have been able to do for development) the shared libraries are referenced from /opt/???   
When I run the macdeployqt script it doesn't completely resolve all of the issues and move the required dependencies inside the .app bundle
When I get that fixed it runs then crashes loading Qt image plugins. 

So making it portable is the challenge here.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

 

Google+