Skip to content

Conversation

@boutinb
Copy link
Contributor

@boutinb boutinb commented Dec 15, 2025

Only Common, CommonData, QMLComponnents, R-INterface and SyntaxBridge needs to be compiled with static Qt libraries
For this detect this by loading the Qt Core library and set USE_QT_STATIC_QT_LIBS to ON if the QtCore lib is static.

The SyntaxBridge is built as a shared library so that it can be used directly by the jaspSyntax R package: for this it uses the qt_import_qml_plugins CMAKE function so that Qt loads automatically the needed (static) plugins in the SyntaxBridge library (with the use of a Dummy.sql that uses all the needed import statement).
Also SyntaxBridge needs to load the Qt Minimal plugin platform so that the jaspSyntax can start a Qt application to load the QML form.

Only Common, CommonData, QMLComponnents, R-INterface and SyntaxBridge needs to be compiled with static Qt libraries
For this detect this by loading the Qt Core library and set USE_QT_STATIC_QT_LIBS  to ON if the QtCore lib is static.
The SyntaxBridge is built as a shared library so that it can be used directly by the jaspSyntax R package: for this it uses the qt_import_qml_plugins CMAKE function so that Qt loads automatically the needed (static) plugins in the SyntaxBridge library (with the use of a Dummy.sql that uses all the needed import statement).
Also SyntaxBridge needs to load the Qt Minimal plugin platform so that the jaspSyntax can start a Qt application to load the QML form.
@boutinb boutinb requested a review from JorisGoosen December 15, 2025 16:54
@JorisGoosen
Copy link
Contributor

JorisGoosen commented Dec 15, 2025

To test this I guess I first need to build Qt statically?
Anything specific I should pay attention too while doing that?

@boutinb
Copy link
Contributor Author

boutinb commented Dec 15, 2025

To test this I guess I first need to build Qt statically? Anything specific I should pay attention too while doing that?

I just wanted to set the Static Qt libraries I built (on Windows and Mac) on the static server, but my ssh does not work anymore...

@boutinb
Copy link
Contributor Author

boutinb commented Dec 15, 2025

But if you want to build them, load the Qt sources and do the following:

./configure -debug -static -opensource -confirm-license -prefix ../BuildStaticDebug -submodules qtbase,qtdeclarative,qtshadertools,qt5compat,qtpositioning

cmake --build . --parallel

cmake --install .

@JorisGoosen
Copy link
Contributor

How do you "load the qtcore" I downloaded?

@JorisGoosen
Copy link
Contributor

First problem found I guess, if I select qmake in qtcreator in a naive attempt to load qt from your nice static build I get the (actually not so surprising) error message that it isnt safe:
image

@JorisGoosen
Copy link
Contributor

If I try on windows I get
Screenshot 2025-12-16 at 16 46 28

@boutinb
Copy link
Contributor Author

boutinb commented Dec 23, 2025

There is a (start of a ) documentation here https://github.com/jasp-stats/jasp-desktop/blob/development/Docs/development/jasp-syntax-guide.md

If you have a Windows machine, you can try to install jaspSyntax with remotes (remotes::install_github("jasp-stats/jaspSyntax")
I'm curious if it works for you. On my laptop it works, but not on the ex-buildbot machine. There is a crash when it tries to lock a mutex (it crashes only in release mode, not in debug mode, I'm searching further).

@JorisGoosen
Copy link
Contributor

Running `R CMD build`...
* checking for file 'C:\Users\Joris\AppData\Local\Temp\RtmpG4uhx6\remotes78f813e44b63\jasp-stats-jaspSyntax-da5e6a3/DESCRIPTION' ... OK
* preparing 'jaspSyntax':
* checking DESCRIPTION meta-information ... OK
* cleaning src
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* building 'jaspSyntax_1.2.tar.gz'
Installing package into ‘C:/Users/Joris/AppData/Local/R/win-library/4.5’
(as ‘lib’ is unspecified)
* installing *source* package 'jaspSyntax' ...
** this is package 'jaspSyntax' version '1.2'
** using staged installation
Found R_HOME: C:/PROGRA~1/R/R-45~1.2
Downloading https://raw.githubusercontent.com/jasp-stats/jasp-desktop/refs/heads/development/SyntaxInterface/syntaxbridge_interface.h with curl
syntaxbridge_interface.h loaded from https://raw.githubusercontent.com/jasp-stats/jasp-desktop/refs/heads/development/SyntaxInterfaceDownloading https://static.jasp-stats.org/jaspSyntax/1.0//SyntaxInterfaceDebug.dll with curl
SyntaxInterfaceDebug.dll loaded from https://static.jasp-stats.org/jaspSyntax/1.0/Wrong checksum!
ERROR: configuration failed for package 'jaspSyntax'
* removing 'C:/Users/Joris/AppData/Local/R/win-library/4.5/jaspSyntax'
Warning message:
In i.p(...) :
  installation of package ‘C:/Users/Joris/AppData/Local/Temp/RtmpG4uhx6/file78f83d892b39/jaspSyntax_1.2.tar.gz’ had non-zero exit status
> 

@JorisGoosen
Copy link
Contributor

Works nicely on macos now!

> remotes::install_github('jasp-stats/jaspSyntax')
...
> dataf = read.csv("~/Broncode/JASP/jasp-desktop/Tests/TestLibrary/csv/debug.csv")
> jaspSyntax::loadDataSet(dataf)
...
> remotes::install_github('jasp-stats/jaspTTests')
...
> jaspTTests::TTestOneSample(
+           data = NULL,
+           version = "0.95",
+           formula =  ~ contNormal + contExpon)
Desktop:	AnalysisForm::formCompletedHandler for 0x105edd470 called.
Desktop:	AnalysisForm::setAnalysisUp() for 0x105edd470
Desktop:	QML form created
Desktop:	Parse Syntax Options: {
	"alternative" : "twoSided",
	"barPlot" : false,
	"barPlotCiLevel" : 0.94999999999999996,
	"barPlotErrorType" : "ci",
	"barPlotYAxisFixedToZero" : true,
	"dependent" : 
	{
		"types" : [],
		"value" : []
	},
	"descriptives" : false,
	"descriptivesPlot" : false,
	"descriptivesPlotCiLevel" : 0.94999999999999996,
	"effectSize" : false,
	"effectSizeCi" : false,
	"effectSizeCiLevel" : 0.94999999999999996,
	"formula" : 
	{
		"formula" : "~contNormal + contExpon",
		"lhs" : 
		{
			"vars" : []
		},
		"rhs" : 
		{
			"fixed" : 
			{
				"intercept" : true,
				"vars" : 
				[
					"contNormal",
					"contExpon"
				]
			},
			"random" : null
		}
	},
	"meanDifference" : false,
	"meanDifferenceCi" : false,
	"meanDifferenceCiLevel" : 0.94999999999999996,
	"naAction" : "perVariable",
	"normalityTest" : false,
	"plotHeight" : 320,
	"plotWidth" : 480,
	"qqPlot" : false,
	"raincloudPlot" : false,
	"raincloudPlotHorizontal" : false,
	"student" : true,
	"testValue" : 0,
	"vovkSellke" : false,
	"wilcoxon" : false,
	"zTest" : false,
	"zTestSd" : 1
}

Desktop:	Formula: {
	"formula" : "~contNormal + contExpon",
	"lhs" : 
	{
		"vars" : []
	},
	"rhs" : 
	{
		"fixed" : 
		{
			"intercept" : true,
			"vars" : 
			[
				"contNormal",
				"contExpon"
			]
		},
		"random" : null
	}
}

Desktop:	DataSet::DataSet(index=1)
Desktop:	Opened internal sqlite database for loading at '/Users/joris/Library/Application Support/JASP/temp//7741/internal.sqlite'. This is for thread 0x16dfc3000
Desktop:	Opened internal sqlite database for loading at '/Users/joris/Library/Application Support/JASP/temp//7741/internal.sqlite'. This is for thread 0x16e04f000
Desktop:	Loaded a database with #5 tables.
Desktop:	Loaded a database with #5 tables.
Desktop:	Opened internal sqlite database for loading at '/Users/joris/Library/Application Support/JASP/temp//7741/internal.sqlite'. This is for thread 0x16e0db000
Desktop:	Loaded a database with #5 tables.
Desktop:	Opened internal sqlite database for loading at '/Users/joris/Library/Application Support/JASP/temp//7741/internal.sqlite'. This is for thread 0x16e1f3000
Desktop:	Loaded a database with #5 tables.
Desktop:	Opened internal sqlite database for loading at '/Users/joris/Library/Application Support/JASP/temp//7741/internal.sqlite'. This is for thread 0x16e27f000
Desktop:	Opened internal sqlite database for loading at '/Users/joris/Library/Application Support/JASP/temp//7741/internal.sqlite'. This is for thread 0x16e30b000
Desktop:	Loaded a database with #5 tables.
Desktop:	Opened internal sqlite database for loading at '/Users/joris/Library/Application Support/JASP/temp//7741/internal.sqlite'. This is for thread 0x16e167000
Desktop:	Opened internal sqlite database for loading at '/Users/joris/Library/Application Support/JASP/temp//7741/internal.sqlite'. This is for thread 0x16e397000
Desktop:	Opened internal sqlite database for loading at '/Users/joris/Library/Application Support/JASP/temp//7741/internal.sqlite'. This is for thread 0x16e423000
Desktop:	Loaded a database with #5 tables.
Desktop:	Opened internal sqlite database for loading at '/Users/joris/Library/Application Support/JASP/temp//7741/internal.sqlite'. This is for thread 0x16e4af000
Desktop:	Loaded a database with #5 tables.
Desktop:	Loaded a database with #5 tables.Desktop:	Loaded a database with #5 tables.

Desktop:	Loaded a database with #5 tables.
Did not store jaspResults
Created Write Seal for jaspResults at: '' 
results TTestOneSample:
	"ttest":
		table One Sample T-Test:
			status: complete
			                                                                                      
			                                 v                       t             df   p      
			                               |-----------------------|-------------|----|-------|
			Student-contNormal  | contNormal | -1.7833e+00 | 99 | 0.078 |
			                               |-----------------------|-------------|----|-------|
			Student-contExpon   | contExpon  | 1.0000e+00  | 99 | 0.320 |
			                               |-----------------------|-------------|----|-------|

			footnotes:   
				(<em>Note.</em>) 'For the Student t-test, the alternative hypothesis specifies that the mean is different from 0. '
				(<em>Note.</em>) 'Student's t-test.'

	"AssumptionChecks":
		container Assumption Checks

	"ttestDescriptives":
		container Descriptives




@JorisGoosen
Copy link
Contributor

Cant test on windows right now helaas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants