Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Error no file at “/usr/lib/<libs>” when executing macdeployqt
Forum Updated to NodeBB v4.3 + New Features

Error no file at “/usr/lib/<libs>” when executing macdeployqt

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 1 Posters 438 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    davecotter
    wrote on last edited by davecotter
    #1

    Re: Error no file at “/usr/lib/<libs>” when executing macdeployqt

    it seems that you're saying that these should be treated as warnings and not errors? i'm getting them too, even though my script "succeeds" with everything else? is there a way to suppress these warnings?

    should i fix the link paths with otool BEFORE i call macdeployqt?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      davecotter
      wrote on last edited by
      #4

      to get macdeployqt to find the libs at a different place, add -libpath=<path> to the end of the command.

      i have NOT figured out how to get it to place the libs in to the SharedSupport folder, but they DO work inside the Frameworks folder, even though they're NOT frameworks. huh.

      1 Reply Last reply
      1
      • D Offline
        D Offline
        davecotter
        wrote on last edited by davecotter
        #2

        Here's my code if you need that:

        	################################################################
        	# copy Qt libraries
        	#if buildType != 'debug':
        	post_build_cf.qt_deploy(qtDir, buildType, bitDepth, projName)
        
        	if xplat.is_mac():
        		# files into "Contents/SharedSupport/" folder
        
        		################################################################
        		# boost
        		boostLibDir = extDir + 'boost_' + get_boost_vers() + '/stage/lib/'
        		
        		linkFiles = [
        			'libboost_thread',
        			'libboost_system',
        		]
        
        		srcFiles = []
        		for file in linkFiles:
        			srcFiles += [boostLibDir + file + '.dylib']
        			
        		#debug_print("srcFiles: " + str(srcFiles))
        	
        		post_build_cf.copy_to_bundle(	\
        			qtDir, buildType, bitDepth, projName, 'SharedSupport/', srcFiles)
        
        		# on mac, must manually link shared libs, dylibs
        		mac_link_shared.link(appPath, linkFiles)
        

        and

        def qt_deploy(qtDir, buildType, bitDepth, projName):
        	appPath = get_app_path(qtDir, buildType, bitDepth, projName)
        	
        	qt_IDE_folder	= paths.get_qt_IDE_folder(True)
        
        	if xplat.is_mac():
        		# on mac, bundle has already been created, 
        		# but it must be moved into place
        		
        		qtDeployExe	= qt_IDE_folder + 'clang_64/bin/macdeployqt'
        		qtDestAppPath = appPath[:-1]
        	else:
        		qtDeployExe	= qt_IDE_folder + get_win_compiler_vers()
        		
        		if bitDepth == 64:
        			qtDeployExe += '_' + bitDepth
        		
        		qtDeployExe += '/bin/windeployqt.exe'
        		qtDestAppPath = get_exe_path(appPath)
        
        	libVers = os.path.basename(qt_IDE_folder[:-1])
        		
        	print '\tCopying Qt Libraries: ' + libVers + '...'
        
        	cmd = [
        		qtDeployExe, 
        		#'--compiler-runtime',
        		qtDestAppPath,
        	]
        	
        	debug_print('cmd: ' + str(cmd))
        	
        	if False:
        		# to show less logging / errors
        		xplat.pipe(cmd, False);
        	else:
        		# shows more errors
        		xplat.system(cmd)
        

        and

        def link(appPath, libArray, supportFolder = 'SharedSupport/'):
        	print "\tLinking Shared Libraries..."
        
        	exePath = post_build_cf.get_exe_path(appPath)
        
        	for libName in libArray:
        		print '\t\t' + libName
        		libName += '.dylib'
        
        		cmd = [
        			'install_name_tool',
        			'-change',
        			libName,
        			'@loader_path/../' + supportFolder + libName,
        			exePath]
        
        		debug_print('cmd: ' + str(cmd))
        
        		# install_name_tool -change libboost_thread.dylib @loader_path/../SharedSupport/libboost_thread.dylib "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}";
        		xplat.pipe(cmd, True);
        
        1 Reply Last reply
        0
        • D Offline
          D Offline
          davecotter
          wrote on last edited by
          #3

          it seems that macdeployqt wants to copy the boost libs AND call install_name_tool to fix the @loader_path.

          but the source should be boost_dir/stage/lib/, not /usr/lib/
          and the dest SharedSupport not Frameworks ?

          how do i make the proper call to macdeployqt?

          1 Reply Last reply
          0
          • D Offline
            D Offline
            davecotter
            wrote on last edited by
            #4

            to get macdeployqt to find the libs at a different place, add -libpath=<path> to the end of the command.

            i have NOT figured out how to get it to place the libs in to the SharedSupport folder, but they DO work inside the Frameworks folder, even though they're NOT frameworks. huh.

            1 Reply Last reply
            1

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved