Community
    • Login

    Error build SciLexer.dll with boost

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    20 Posts 2 Posters 2.7k Views
    Loading More Posts
    • 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.
    • andrecool-68A
      andrecool-68 @Ekopalypse
      last edited by

      @Ekopalypse
      Now there is a new error:

      LINK : fatal error LNK1104: can not open file "libboost_regex-vc141-mt-s-x
      32-1_70.lib"
      NMAKE : fatal error U1077: "C:\Program Files (x86)\Microsoft Visual Studio\2017\
      Professional\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\link.EXE" : returned
      code "0x450"
      Stop.

      I changed the command (deleted the line address-model=64)
      C:\sources\boost_1_70_0\bjam.exe toolset=msvc link=static threading=multi runtime-link=static address-model=64 release stage

      C:\sources\boost_1_70_0\bjam.exe toolset=msvc link=static threading=multi runtime-link=static release stage

      There are currently two libraries.

      Imgur

      Then the file was collected (I understand that it is for x32)
      C:\notepad-plus-plus-master\scintilla\bin\SciLexer.dll

      Imgur

      There are more questions.
      Authenticode check failed: signing certificate or hash is not recognized
      How exactly to sign the certificate and how to build SciLexer.dll for x64

      EkopalypseE 1 Reply Last reply Reply Quote 0
      • EkopalypseE
        Ekopalypse @andrecool-68
        last edited by

        @andrecool-68

        Please keep in mind that I’m not really a C++ developer. I just have started investigating this language a few weeks ago. So treat my answers with skeptic.

        Depending on your VS project you either build x86 or x64 binaries and depending on that configuration VS would grab the one or the other boost::regex library as long as
        the libs can be found.

        Concerning the “Authenticode check failed” issue,
        as far as I understood, a npp debug build can be created without a signed scintilla dll but release builds are checking for signed dlls.
        Source is this.

        You either can change the code to isOK = true; or you create your own certificates.
        But how creating a singend scintilla is done I haven’t investigated yet. Not sure I ever will.

        1 Reply Last reply Reply Quote 3
        • andrecool-68A
          andrecool-68
          last edited by

          @Ekopalypse
          To build SciLexer.dll x64 I used x64 Native Tools Command Prompt for VS 2017
          I now have two files:
          x32 SciLexer.dll ~ 1.22 mb
          x64 SciLexer.dll ~ 1.73 mb

          It remains to understand how to pee this “nasty” certificate)))

          EkopalypseE 1 Reply Last reply Reply Quote 2
          • EkopalypseE
            Ekopalypse @andrecool-68
            last edited by

            @andrecool-68

            Does this mean you haven’t used Visual Studio 2017 to build notepad++ at all?
            Did you only build scintilla dll and copied it into an existing npp installation?

            andrecool-68A 2 Replies Last reply Reply Quote 2
            • andrecool-68A
              andrecool-68 @Ekopalypse
              last edited by

              @Ekopalypse
              Notepad ++ was compiled from the last project of the author. Build release gives certificate error.

              1 Reply Last reply Reply Quote 2
              • andrecool-68A
                andrecool-68 @Ekopalypse
                last edited by

                @Ekopalypse The debug build works without a certificate error))

                EkopalypseE 1 Reply Last reply Reply Quote 2
                • EkopalypseE
                  Ekopalypse @andrecool-68
                  last edited by

                  @andrecool-68

                  Yes, great - that is expected

                  andrecool-68A 1 Reply Last reply Reply Quote 1
                  • andrecool-68A
                    andrecool-68 @Ekopalypse
                    last edited by

                    @Ekopalypse The author himself will add a signature to the next build project … did I understand you correctly?

                    EkopalypseE 2 Replies Last reply Reply Quote 2
                    • EkopalypseE
                      Ekopalypse @andrecool-68
                      last edited by Ekopalypse

                      @andrecool-68

                      Yes, if you refer to the release build.
                      Debug builds will never have such a signature to allow code contributors to easily test there changes/modifications. That’s my understanding.

                      Edit: With release build I mean the binaries delivered by either the installation or a portable zip.

                      1 Reply Last reply Reply Quote 2
                      • EkopalypseE
                        Ekopalypse @andrecool-68
                        last edited by

                        @andrecool-68

                        My lunch break is over - I will follow up later today.

                        andrecool-68A 1 Reply Last reply Reply Quote 1
                        • andrecool-68A
                          andrecool-68 @Ekopalypse
                          last edited by

                          @Ekopalypse Discussio mater veritas est

                          EkopalypseE 2 Replies Last reply Reply Quote 1
                          • EkopalypseE
                            Ekopalypse @andrecool-68
                            last edited by

                            @andrecool-68 or better In vino veritas :-D

                            1 Reply Last reply Reply Quote 2
                            • EkopalypseE
                              Ekopalypse @andrecool-68
                              last edited by

                              @andrecool-68
                              I found this commit and it looks like that this is the area
                              where one would need to hack around to create its own key but as said, I don’t really know how this certificates stuff work, yet.

                              andrecool-68A 1 Reply Last reply Reply Quote 3
                              • andrecool-68A
                                andrecool-68 @Ekopalypse
                                last edited by

                                @Ekopalypse

                                Interesting things, there is a GPG public key
                                https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/nppGpgPub.asc
                                But after building projects SciLexer.dll and notepad ++.exe

                                When starting notepad ++.exe an error appears
                                Authenticode check failed: signing certificate or hash is not recognized

                                Where is the truth hiding?

                                1 Reply Last reply Reply Quote 1
                                • andrecool-68A
                                  andrecool-68
                                  last edited by

                                  Maybe I have some components missing in Visual Studio 2017?

                                  {
                                  	"version": "1.0",
                                  	"components": [
                                  		"Microsoft.VisualStudio.Workload.NativeDesktop",
                                  		"microsoft.visualstudio.component.vc.cmake.project",
                                  		"microsoft.visualstudio.componentgroup.nativedesktop.win81",
                                  		"microsoft.visualstudio.componentgroup.nativedesktop.winxp",
                                  		"microsoft.visualstudio.component.vc.atlmfc",
                                  		"microsoft.visualstudio.component.windows10sdk.10586",
                                  		"microsoft.visualstudio.component.vc.140"
                                  	]
                                  }
                                  
                                  EkopalypseE 1 Reply Last reply Reply Quote 0
                                  • EkopalypseE
                                    Ekopalypse @andrecool-68
                                    last edited by Ekopalypse

                                    @andrecool-68

                                    I don’t think that you are missing something regarding the certification process.
                                    It is expected that you cannot build a release version and use it with a non-signed scintilla dll.
                                    Only debug builds can be used in this manner unless you change the code in the release build.

                                    The way it works, as far as I understand, is like this.

                                    You build a release version of scintilla.
                                    You sign the scintilla dll with your private key.
                                    You put the public key, which is one result from signing the dll, into notepad++ and build the release version.
                                    Now on startup, I assume, it won’t report that error.

                                    The exact details on how to do it, I haven’t figured out yet.
                                    There are still too many open questions for me about the whole PKI thinggy.

                                    andrecool-68A 2 Replies Last reply Reply Quote 1
                                    • andrecool-68A
                                      andrecool-68 @Ekopalypse
                                      last edited by

                                      @Ekopalypse
                                      I did not understand where to put this key before building the project.

                                      1 Reply Last reply Reply Quote 0
                                      • andrecool-68A
                                        andrecool-68 @Ekopalypse
                                        last edited by

                                        @Ekopalypse

                                        https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/README.md
                                        In the README file, I cannot understand what exactly needs to be done with this public key.

                                        1 Reply Last reply Reply Quote 0
                                        • First post
                                          Last post
                                        The Community of users of the Notepad++ text editor.
                                        Powered by NodeBB | Contributors