Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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



  • 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?



  • 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.



  • 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);
    


  • 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?



  • 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.


Log in to reply