Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Trying to build for windows #1038

Closed
wants to merge 9 commits into from
Closed

[WIP] Trying to build for windows #1038

wants to merge 9 commits into from

Conversation

Patarimi
Copy link

@Patarimi Patarimi commented Feb 25, 2021

I try to build qucs for windows using msys. The list below summaries what works.

  • autotools
  • man
  • src
  • qucs-lib
  • tools
  • translations
  • examples
  • include
  • main
    build successful. However, in debug mode, it crashes with the following message
incomplete:../../src/settings.cpp:14:tQucsSettings
error 3 bad internal command: attach
error 3 bad internal command: attach
error 3 bad internal command: attach
error 3 bad internal command: attach
error 3 bad internal command: attach
error 3 bad internal command: loadlegacylib
error 3 bad internal command: attach
error 3 bad internal command: attach
error 5 no language qucsator
  • cli
  • contrib
    note : need to include qcustomplot.h et qcustomplot.cpp in msys64\mingw64\include (to be added in the appveyor.yml script ?)
  • tests
  • legacy
  • plugins

@felix-salfelder
Copy link
Member

felix-salfelder commented Feb 25, 2021 via email

@Patarimi
Copy link
Author

Thanks a lot for your responses. It was very helpfull. Every things compile now !

  • main build successful, in debug crash with the following message assertion failed in main/main.cpp: line 190 the line.png file is not find.
    The line.png line is a sanity check, I don't know exactly where QFile is looking for things, but you won't see any icons if this does not work. I wouldn't mind to drop the "resource files" for some more sensible approach...

The program still crash after anyway, but all the .png are missing. Maybe there is a problem in the src folder ?

  • cli ../../cli/main.cpp:69:3: error: 'sigjmp_buf' does not name a type; did you mean 'jmp_buf'?
    This should be handled by platform.h. maybe I broke it. maybe it has to do with SIGSETJMP_IS_BROKEN. see line 138. try -DSIGSETJMP_IS_BROKEN.

Fix with -DSIGSETJMP_IS_BROKEN.

  • contrib note : need to include qcustomplot.h et qcustomplot.cpp in msys64\mingw64\include (to be added in the appveyor.yml script ?)
    This plugin is optional. install qcustomplot headers, or just skip it. (there will be changes to how plugins will be built, better dont waste your time on configure.ac)
    /bin/sh ../../libtool --tag=CXX --mode=link g++ -g -O2 -g -O0 -pipe -fno-check-new -W -Wall -std=c++14 -O0 -fPIC -fPIC -g -O2 -g -O0 -pipe -fno-check-new -W -Wall -std=c++14 -O0 -shared -module -avoid-version -mwindows -o vadim.la -rpath /c/qucs-win64/lib/qucs//contrib/vadim/.. vadim_la-DIODE_SPICE.lo libtool: error: can't build x86_64-w64-mingw32 shared library unless -no-undefined is specified
    Do you see this for all plugins? you need to link them against libqucs (on some non-POSIX platforms.). plugins should be linked against QUCS_LIBS (e.g. through qucs-conf, but currently autotools...), it needs to be set accordingly. Perhaps you also need to link qt libraries, sometimes but not sure.

I add -no-undefined in LD_FLAGS variable and it fix it. It seems to be mandatory when the -shared flag is used.

  • tests - [x] legacy test -L _ || cp -pR .libs/action.so _ cp: cannot stat '.libs/action.so': No such file or directory
    strange. will have a look.

This error disappeared.

@felix-salfelder
Copy link
Member

felix-salfelder commented Feb 26, 2021 via email

@Patarimi
Copy link
Author

Patarimi commented Mar 3, 2021

I think I fix the issue with the missing file (see 6212ba6).
For the lib_LD_FLAGS, want do you mean by hard-coded ? For example, is the fix in 0ae75e2 correct ?
The program still don't start perhaps because the qucsator program is not accessible.

@Patarimi Patarimi marked this pull request as ready for review March 3, 2021 08:06
@felix-salfelder
Copy link
Member

felix-salfelder commented Mar 3, 2021 via email

@Patarimi
Copy link
Author

Patarimi commented Mar 3, 2021

Never thought about it, but -no-undefined is probably wrong in general. What does it do exactly?

According to the documentation :

-no-undefined
Declare that output-file does not depend on any libraries other than the ones listed on the command line, i.e., after linking, it will not have unresolved symbols. Some platforms require all symbols in shared libraries to be resolved at library creation (see Inter-library dependencies), and using this parameter allows libtool to assume that this will not happen.

This is probably specific to windows. This may also explain why the declaration below is mandatory.

hidpi_la_LIBADD = $(X11_LIBS) $(QT_LIBS)
This may be needed on non-POSIX, but it is wrong in general and it has side effects.

The program still don't start perhaps because the qucsator program is not accessible.
Do you have an error message? qucsator is not needed for sure.

When run from a terminal, it output the following:

incomplete:../../src/settings.cpp:14:tQucsSettings
error 3 bad internal command: attach
error 3 bad internal command: attach
error 3 bad internal command: attach
error 3 bad internal command: attach
error 3 bad internal command: attach
error 3 bad internal command: loadlegacylib
error 3 bad internal command: attach
error 3 bad internal command: attach
error 5 no language qucsator

@felix-salfelder
Copy link
Member

felix-salfelder commented Mar 3, 2021 via email

@Patarimi
Copy link
Author

Patarimi commented Mar 3, 2021

I have not found the solution yet. I'll try to look for it tomorrow.
Here are the config.log and the make output:
make.log
config.log

@felix-salfelder
Copy link
Member

felix-salfelder commented Mar 3, 2021 via email

@felix-salfelder felix-salfelder deleted the branch Qucs:refactor+qt5-22 March 21, 2021 16:09
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