Skip to content

Compile failure for Windows nightlies #1471

Closed

Description

@justinclift

The windows nightlies have been failing to compile for the last two days, and I've just now had time to take a look.

The problem seems to be a change in the CMakeLists.txt:

C:\git_repos\sqlitebrowser\release-sqlite-win32>cmake -G "Visual Studio 12 2013" -Wno-dev ..  1>>C:\\dev\\nightlies.log

CMake Error at CMakeLists.txt:353 (add_executable):
  The target name "DB Browser for SQLite" is reserved or not valid for
  certain CMake features, such as generator expressions, and may result in
  undefined behavior.


CMake Error at CMakeLists.txt:361 (add_dependencies):
  Cannot add target-level dependencies to non-existent target "DB Browser for
  SQLite".

  The add_dependencies works for top-level logical targets created by the
  add_executable, add_library, or add_custom_target commands.  If you want to
  add file-level dependencies see the DEPENDS option of the add_custom_target
  and add_custom_command commands.


CMake Error at CMakeLists.txt:363 (add_dependencies):
  Cannot add target-level dependencies to non-existent target "DB Browser for
  SQLite".

  The add_dependencies works for top-level logical targets created by the
  add_executable, add_library, or add_custom_target commands.  If you want to
  add file-level dependencies see the DEPENDS option of the add_custom_target
  and add_custom_command commands.


CMake Error at CMakeLists.txt:366 (add_dependencies):
  Cannot add target-level dependencies to non-existent target "DB Browser for
  SQLite".

  The add_dependencies works for top-level logical targets created by the
  add_executable, add_library, or add_custom_target commands.  If you want to
  add file-level dependencies see the DEPENDS option of the add_custom_target
  and add_custom_command commands.


CMake Error at CMakeLists.txt:382 (target_link_libraries):
  Cannot specify link libraries for target "DB Browser for SQLite" which is
  not built by this project.

The line numbers given don't seem to match up to any recent CMakeLists.txt change, so I'm not 100% sure what the problem is. Possibly related to 961141e though, as that change matches up with the start of the compile failure.

Anyone have ideas on what to try?

Activity

  1. MKleusberg commented on Jul 12, 2018

    @MKleusberg
    Member

    I think this is because of the spaces in the project name. Because we changed the cmake version from 2.x to 3.x this new policy is taking effect now. The other OSs didn't produce errors because the project name there is sqlitebrowser, without any spaces.

    Shall we rename the project to DB_Browser_for_SQLite or back to sqlitebrowser on Windows?

  2. justinclift commented on Jul 12, 2018

    @justinclift
    MemberAuthor

    I guess we'll have to. We'll need to ensure the final resulting binary gets renamed to "DB Browser for SQLite.exe", but that might just mean adding a manual rename step somewhere appropriate. 😄

  3. added a commit that references this issue on Jul 12, 2018
  4. MKleusberg commented on Jul 12, 2018

    @MKleusberg
    Member

    Looks like there is a way to have different names for the project and the executable in cmake. Let's try if that works - I've just pushed a commit for this 😄

  5. justinclift commented on Jul 12, 2018

    @justinclift
    MemberAuthor

    Just kicked off a new nightly build manually to see if it works... and it's still erroring out. Just the one failure this time though:

    C:\git_repos\sqlitebrowser\release-sqlite-win32>cmake -G "Visual Studio 12 2013" -Wno-dev ..  1>>C:\\dev\\nightlies.log
    
    CMake Error at CMakeLists.txt:34 (set_target_properties):
      set_target_properties Can not find target to add properties to:
      sqlitebrowser
    
  6. justinclift commented on Jul 12, 2018

    @justinclift
    MemberAuthor

    Hmmm, I wonder if something like this will work?

    set(OUTPUT_NAME "DB Browser for SQLite.exe")
    

    I'll give that a go in a temp branch, and see what happens.

  7. justinclift commented on Jul 12, 2018

    @justinclift
    MemberAuthor

    Hmmm, well that doesn't error out with CMake now, but it's still not happy. Still investigating.

    As an aside, this error is showing up in the MSVC console now when compiling manually through MSVC:

    6>C:\git_repos\sqlitebrowser\src\sqltextedit.cpp(64): error C3409: empty attribute block is not allowed
    6>C:\git_repos\sqlitebrowser\src\sqltextedit.cpp(64): error C2143: syntax error : missing ']' before '['
    6>C:\git_repos\sqlitebrowser\src\sqltextedit.cpp(64): error C2653: 'clang' : is not a class or namespace name
    6>C:\git_repos\sqlitebrowser\src\sqltextedit.cpp(64): error C2337: 'fallthrough' : attribute not found
    6>C:\git_repos\sqlitebrowser\src\sqltextedit.cpp(64): error C2143: syntax error : missing ';' before ']
    

    Looks to be with the commit for silencing the clang warning the other day.

  8. justinclift commented on Jul 12, 2018

    @justinclift
    MemberAuthor

    Ahhh, yep. That clang suppression line is definitely breaking the build. Just tested things without it, and the compile happens... although the output name is still getting done as "sqlitebrowser.exe" atm. Working on solving that next.

  9. justinclift commented on Jul 13, 2018

    @justinclift
    MemberAuthor

    Initial working fix in 9a76537. I'll wait to see the nightly build fully run successfully by itself before closing this though. 😄

  10. justinclift commented on Jul 13, 2018

    @justinclift
    MemberAuthor

    Well, it's partially working now. The 32-bit Windows builds all seemed to work, but the 64-bit Windows .msi's didn't. I'm pretty sure it's due to some tweaks I was making in the build script on the server (manual file renaming in the script), rather than a code problem.

    Investigating now.

  11. justinclift commented on Jul 13, 2018

    @justinclift
    MemberAuthor

    Turned out I'd just forgotten to update the new Qt path in the msi building bit. That's now, done.

    The 64-bit .exe's being generated though aren't good. Weirdly, it appears to be a problem with Win7's dos based COPY command. Copying the "good" win64 .exe from one location to the eventual dir it's uploaded from is resulting in only the first few mb of the file being copied to the destination file. Consistently. Seen this one before, and the work was to copy it to a temp location using a slightly different method, then doing a 2nd copy to get it to the right spot. That's not working this time. Bizarre. Still investigating for a workaround.

  12. justinclift commented on Jul 13, 2018

    @justinclift
    MemberAuthor

    Oops, no. It's not the copy going wrong for the 64 bit ones. Something else is wrong before that... when trying to run the 3MB Win64 .exe, it complains about missing Qt .dll's. Looks like they're not getting included for some unknown reason.

    I'll drop back to Qt 5.7 for the 64-bit too, and see if the behaviour changes.

  13. justinclift commented on Jul 13, 2018

    @justinclift
    MemberAuthor

    No change. Doesn't seem to be caused by the Qt version.

    Instead of spending further hours trying to figure this out, let's just drop the .exe's. We'd been planning to move to .msi's only anyway.

  14. justinclift commented on Jul 13, 2018

    @justinclift
    MemberAuthor

    k, things seem to be working acceptably now (.msi's only). For Windows 32-bit, the Qt version is still 5.7. For the 64-bit version, we're now using 5.10.1.

  15. 9 remaining items

  16. justinclift commented on Jul 15, 2018

    @justinclift
    MemberAuthor

    @jungle-boogie @karim Would you have time to check today's nightlie's again? They're now rebuilt using Qt 5.9, so it'll be interesting to see if that makes a difference. 😄

  17. karim commented on Jul 15, 2018

    @karim
    Member

    Latest nightly (Qt 5.9.6) fixed the GUI look, but not the network error.

  18. justinclift commented on Jul 15, 2018

    @justinclift
    MemberAuthor

    Thanks, that's useful info. I'll drop it back to Qt 5.8, and we can see if the network error still shows up.

    Looks like it's not a "Must use OpenSSL 1.1" thing then too.

  19. karim commented on Jul 15, 2018

    @karim
    Member

    One odd thing with July 15 build is this..

    db4s

    The right side where you can have SQL log, Plot, and DB Schema is always there. In earlier version, if you are not using/showing them it would stretch the main view to the whole window, like this..

    db4s2

    First screenshot is July 15 build (Qt 5.9.6). Second screenshot is July 14 (Qt 5.10.1).

    Edit: To make that grey area go away you have to show a view in it (SQL log or DB Schema for example) then slightly resize it then close, and it will disappear. If you show it without resizing it will not disappear.

  20. justinclift commented on Jul 15, 2018

    @justinclift
    MemberAuthor

    Weird. Kind of seems like a Qt 5.9 bug, as that doesn't happen with 5.7 nor 5.10.1.

  21. justinclift commented on Jul 15, 2018

    @justinclift
    MemberAuthor

    k, new Windows nightlies have just been uploaded. These ones are based on Qt 5.8.

  22. MKleusberg commented on Jul 15, 2018

    @MKleusberg
    Member

    The style seems like it's easy enough to fix: we probably only need to add the styles\qwindowsvistastyle.dll file to the plugin directory. See here and here.

  23. justinclift commented on Jul 15, 2018

    @justinclift
    MemberAuthor

    Cool. 😄

    I'm kind of suspecting the network error dialog might be caused by some missing new Qt dll too. 😄

  24. jungle-boogie commented on Jul 16, 2018

    @jungle-boogie
    Contributor

    With 16 July download, I cannot open DB Browser:
    The program can't start because Qt5Network.dll is missing from your computer. Try reinstalling the program to fix this problem.

  25. jungle-boogie commented on Jul 16, 2018

    @jungle-boogie
    Contributor

    Ah, removing and reinstalling actually fixed it!

  26. jungle-boogie commented on Jul 16, 2018

    @jungle-boogie
    Contributor

    I see the QT version is currently 5.8.

  27. justinclift commented on Jul 16, 2018

    @justinclift
    MemberAuthor

    Sounds like the 16th July nightly is in decent shape then. Guess that means the weird network problem dialog is due to something introduced in Qt 5.9. It should show up in the 5.9 release notes then...

    ... except there's nothing obviously related to it there. 😦

  28. karim commented on Jul 16, 2018

    @karim
    Member

    With 16 July download, I cannot open DB Browser:
    The program can't start because Qt5Network.dll is missing from your computer. Try reinstalling the program to fix this problem.

    I think I have an idea why..

    1. Current installed app is using Qt 5.9 DLLs, but new version is using Qt 5.8 DLLs.
    2. Installer detected that some installed files are newer (5.9) than the ones being installed (5.8).
    3. Installer doesn't install these DLLs since you have a newer version of them already (default action).
    4. Trying to run the app will fail cause these files are missing now.

    Reinstalling or repairing the installer should fix this. Right-click on the .msi file and select Repair will do it.

    @justinclift Yes, you are right. 16th July build fixed both (GUI and network) problems for me. Also I don't get this grey area on the right side as I mentioned in my earlier comment. Thanks 😄

  29. justinclift commented on Jul 16, 2018

    @justinclift
    MemberAuthor

    Cool. Guess this issue can be closed again now. 😄

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions