Documentation what is needed to build on Windows

45 vues
Accéder directement au premier message non lu

Mark Rotteveel

non lue,
8 mai 2023, 11:46:1208/05/2023
à firebir...@googlegroups.com
Is it documented somewhere what exactly is needed to build on Windows? I
just tried for the first time in a few months(?) to build Firebird
locally, and it failed because it now has a dependency on unzip.

Based on the discussion on
https://github.com/FirebirdSQL/firebird/commit/d1cde0b02aeeceb9ff77792591c909fbd8ef1a41
and
https://github.com/FirebirdSQL/firebird/commit/64ecbd8dd2026baf6954c3ce09e77bbf85613a9e
I seem to need to add "the posix tools from a git install to the path".

But what does that mean? Does it mean adding C:\Program
Files\Git\usr\bin to the PATH, or something else?

Mark
--
Mark Rotteveel

Dimitry Sibiryakov

non lue,
8 mai 2023, 12:03:3108/05/2023
à firebir...@googlegroups.com
Mark Rotteveel wrote 08.05.2023 17:46:
> But what does that mean? Does it mean adding C:\Program Files\Git\usr\bin to the
> PATH, or something else?

Yes, this is exactly that.

--
WBR, SD.

Mark Rotteveel

non lue,
8 mai 2023, 12:05:3508/05/2023
à firebir...@googlegroups.com
OK, thanks. But is this documented anywhere?
--
Mark Rotteveel

Dimitry Sibiryakov

non lue,
8 mai 2023, 12:12:0208/05/2023
à firebir...@googlegroups.com
If it is not in doc/README.build.msvc.html then nowhere I'm afraid.

Perhaps build command files should be adjusted to automatically find GNU
utils relative to GIT directory.

--
WBR, SD.

F. D.Castel

non lue,
8 mai 2023, 14:20:3908/05/2023
à firebird-devel
I'm following README.build.msvc.html but I'm still unable to build.

What I've done. (using chocolatey for tools installs)


# Install Visual Studio Community 2022
#    Run "Visual Studio Installer" and choose "Desktop development with C++" workload

# Install GNU sed (stated in docs)
choco install sed -y

# Install unzip (not stated in docs, but make_icu fails without it)
choco install unzip -y

# Set VS150COMNTOOLS env var (stated in docs)
$env:VS150COMNTOOLS='C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools'

# Build ICU (working)
.\make_icu.bat

# Build BOOT (failing)
.\make_boot.bat

The system cannot find the path specified.


   Setting Environment Variables thus...

   vs_ver=msvc15
   FB_VSCOMNTOOLS=C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools
   platform=x64
   msvc_version=15
   db_path=C:/Temp/firebird
   root_path=C:\Temp\firebird

   (End of setenvvar.bat)


Creating directories

Building CLOOP and generating interfaces...
'nmake' is not recognized as an internal or external command,
operable program or batch file.

Error building interfaces, see interfaces_x64.log

If anyone could help, I'm willing to send a PR with a updated revision (for 2023) of this doc (as soon as I can make the build work).

F. D.Castel

non lue,
8 mai 2023, 14:39:3308/05/2023
à firebird-devel
My bad. I should have listened to VS installer suggestion to reboot my machine after the installation. 

Now make_boot is running, but it still failing with:

    5>ResourceCompile:
         All outputs are up-to-date.
       Link:
         C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:"..\..\..\temp\x64\Release\firebird\intl\fbintl.dll" /INCREMENTAL:NO /NOLOGO /LIBPATH:../../../extern/icu/x64/Release/lib /LIBPATH:../../../extern/re2/builds/x64/Release comctl32.lib ws2_32.lib mpr.lib version.lib psapi.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST:NO /DEBUG /PDB:"..\..\..\temp\
         x64\Release\intl\fbintl.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /DYNAMICBASE:NO /IMPLIB:"..\..\..\temp\x64\Release\intl\fbintl.lib" /MACHINE:X64 /DLL ..\..\..\temp\x64\Release\intl\version.res
         ..\..\..\temp\x64\Release\intl/cs_big5.obj
         ..\..\..\temp\x64\Release\intl/cs_gb2312.obj
         ..\..\..\temp\x64\Release\intl/cs_icu.obj
         ..\..\..\temp\x64\Release\intl/cs_jis.obj
         ..\..\..\temp\x64\Release\intl/cs_ksc.obj
         ..\..\..\temp\x64\Release\intl/cs_narrow.obj
         ..\..\..\temp\x64\Release\intl/cs_unicode_fss.obj
         ..\..\..\temp\x64\Release\intl/cs_unicode_ucs2.obj
         ..\..\..\temp\x64\Release\intl/cv_big5.obj
         ..\..\..\temp\x64\Release\intl/cv_gb2312.obj
         ..\..\..\temp\x64\Release\intl/cv_icu.obj
         ..\..\..\temp\x64\Release\intl/cv_jis.obj
         ..\..\..\temp\x64\Release\intl/cv_ksc.obj
         ..\..\..\temp\x64\Release\intl/cv_narrow.obj
         ..\..\..\temp\x64\Release\intl/cv_unicode_fss.obj
         ..\..\..\temp\x64\Release\intl/kanji.obj
         ..\..\..\temp\x64\Release\intl/lc_ascii.obj
         ..\..\..\temp\x64\Release\intl/lc_big5.obj
         ..\..\..\temp\x64\Release\intl/lc_dos.obj
         ..\..\..\temp\x64\Release\intl/lc_gb2312.obj
         ..\..\..\temp\x64\Release\intl/lc_icu.obj
         ..\..\..\temp\x64\Release\intl/lc_iso8859_1.obj
         ..\..\..\temp\x64\Release\intl/lc_iso8859_13.obj
         ..\..\..\temp\x64\Release\intl/lc_iso8859_2.obj
         ..\..\..\temp\x64\Release\intl/lc_jis.obj
         ..\..\..\temp\x64\Release\intl/lc_ksc.obj
         ..\..\..\temp\x64\Release\intl/lc_narrow.obj
         ..\..\..\temp\x64\Release\intl/lc_unicode_ucs2.obj
         ..\..\..\temp\x64\Release\intl/ld.obj
         C:\Temp\firebird\temp\x64\Release\common\common.lib
         C:\Temp\firebird\temp\x64\Release\yvalve\fbclient.lib
     3>LINK : fatal error LNK1181: cannot open input file 're2.lib' [C:\Temp\firebird\builds\win32\msvc15\fbtrace.vcxproj]
     3>Done Building Project "C:\Temp\firebird\builds\win32\msvc15\fbtrace.vcxproj" (default targets) -- FAILED.
     5>Link:
            Creating library ..\..\..\temp\x64\Release\intl\fbintl.lib and object ..\..\..\temp\x64\Release\intl\fbintl.exp
         intl.vcxproj -> C:\Temp\firebird\temp\x64\Release\firebird\intl\fbintl.dll
       FinalizeBuildStatus:
         Deleting file "..\..\..\temp\x64\Release\intl\intl.tlog\unsuccessfulbuild".
         Touching "..\..\..\temp\x64\Release\intl\intl.tlog\intl.lastbuildstate".
     5>Done Building Project "C:\Temp\firebird\builds\win32\msvc15\intl.vcxproj" (default targets).
     2>Done Building Project "C:\Temp\firebird\builds\win32\msvc15\engine.vcxproj.metaproj" (default targets) -- FAILED.
     1>Done Building Project "C:\Temp\firebird\builds\win32\msvc15\Firebird.sln" (DLLs\engine target(s)) -- FAILED.

Build FAILED.

       "C:\Temp\firebird\builds\win32\msvc15\Firebird.sln" (DLLs\engine target) (1) ->
       "C:\Temp\firebird\builds\win32\msvc15\engine.vcxproj.metaproj" (default target) (2) ->
       "C:\Temp\firebird\builds\win32\msvc15\fbtrace.vcxproj" (default target) (3) ->
       (Link target) ->
         LINK : fatal error LNK1181: cannot open input file 're2.lib' [C:\Temp\firebird\builds\win32\msvc15\fbtrace.vcxproj]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:01.34
MSBuild version 17.5.1+f6fdcf537 for .NET Framework
Build started 08/05/2023 15:36:18.

F. D.Castel

non lue,
8 mai 2023, 15:33:2208/05/2023
à firebird-devel
Found it. 

In setenvvar.bat you learn that the correct variable to set for Visual Studio 2022 is VS170COMNTOOLS. Not VS150COMNTOOLS

Now make_boot.bat is finishing without errors. 



But  .\make_all.bat is whining now:


    29>ResourceCompile:

         All outputs are up-to-date.
       Link:
         All outputs are up-to-date.
         srp.vcxproj -> C:\Temp\firebird\temp\x64\Release\firebird\plugins\srp.dll
    18>c1xx : fatal  error C1083: Cannot open source file: '..\..\..\gen\auth\SecurityDatabase\LegacyManagement.cpp': No such file or directory [C:\Temp\firebird\builds\win32\msvc15\legacy_usermanager.vcxproj]

Vlad Khorsun

non lue,
8 mai 2023, 15:48:3508/05/2023
à firebir...@googlegroups.com
08.05.2023 22:33, F. D.Castel wrote:
> Found it.
>
> In setenvvar.bat you learn that the correct variable to set for Visual Studio 2022 is *VS170COMNTOOLS*. Not *VS150COMNTOOLS*.

You don't have to set it manually if run build in VS command prompt.

> Now make_boot.bat is finishing without errors.
>
>
>
> But .\make_all.bat is whining now:
>
>
>     29>ResourceCompile:
>          All outputs are up-to-date.
>        Link:
>          All outputs are up-to-date.
>          srp.vcxproj -> C:\Temp\firebird\temp\x64\Release\firebird\plugins\srp.dll
>     18>c1xx : fatal  error C1083: Cannot open source file: '..\..\..\gen\auth\SecurityDatabase\LegacyManagement.cpp': No such file
> or directory [C:\Temp\firebird\builds\win32\msvc15\legacy_usermanager.vcxproj]

It must be there. Check your copy of source tree.

BTW, if you uses source tarball (i.e. not a clone from git), make sure all .bat files
uses Windows style for EOF (crlf). unix2dos helps.

Regards,
Vlad

F. D.Castel

non lue,
8 mai 2023, 15:56:2908/05/2023
à firebird-devel
You don't have to set it manually if run build in VS command prompt.

Understood. Thanks Vlad!


 
>     18>c1xx : fatal  error C1083: Cannot open source file: '..\..\..\gen\auth\SecurityDatabase\LegacyManagement.cpp': No such file
> or directory [C:\Temp\firebird\builds\win32\msvc15\legacy_usermanager.vcxproj]

It must be there. Check your copy of source tree.

It is not (!?). Using latest master:


This file doesn't exist. 

There is, however, a LegacyManagement.epp. Is there some kind of preprocessor required to build .cpp from .epp ?

I reviewed the build output but didn't find any other indication of errors.



BTW, if you uses source tarball (i.e. not a clone from git), make sure all .bat files
uses Windows style for EOF (crlf). unix2dos helps.

Not the case. git clone from latest master.

F. D.Castel

non lue,
8 mai 2023, 16:16:4108/05/2023
à firebird-devel
You don't have to set it manually if run build in VS command prompt.

Interestingly, you must use x64 Native Tools Command Prompt for VS 2022.



Using Developer Command Prompt for VS 2022 instead gives another error during make_boot:

Building ttmath (x64\release)...
'ml64.exe' is not recognized as an internal or external command,

operable program or batch file.

Error building ttmath_x64\release, see ttmath_x64\release_x64.log


Investigating further: comparing the environment vars of both prompts it is clear that the later prompt setup a 32-bit environment. 

Vlad Khorsun

non lue,
8 mai 2023, 17:01:3208/05/2023
à firebir...@googlegroups.com
08.05.2023 22:56, F. D.Castel wrote:
> You don't have to set it manually if run build in VS command prompt.
>
>
> Understood. Thanks Vlad!
>
>
> >     18>c1xx : fatal  error C1083: Cannot open source file: '..\..\..\gen\auth\SecurityDatabase\LegacyManagement.cpp': No such
> file
> > or directory [C:\Temp\firebird\builds\win32\msvc15\legacy_usermanager.vcxproj]
>
> It must be there. Check your copy of source tree.
>
>
> It is not (!?). Using latest master:
>
> https://github.com/FirebirdSQL/firebird/tree/master/src/auth/SecurityDatabase
>
> This file doesn't exist.

My comment was about project file C:\Temp\firebird\builds\win32\msvc15\legacy_usermanager.vcxproj.
Seems I misunderstood error message.

> There is, however, a LegacyManagement.*epp*. Is there some kind of preprocessor required to build .cpp from .epp ?

Sure, it is preprocessed after creation of security database, look for following lines at console:

Create security5.fdb...
...
Creating metadata.fdb...
...
Processing alice/alice_meta.epp
Calling GPRE for alice/alice_meta.epp

Processing auth/SecurityDatabase/LegacyManagement.epp
Calling GPRE for auth/SecurityDatabase/LegacyManagement.epp
1 file(s) moved.
...

> I reviewed the build output but didn't find any other indication of errors.
>
>
>
> BTW, if you uses source tarball (i.e. not a clone from git), make sure all .bat files
> uses Windows style for EOF (crlf). unix2dos helps.
>
>
> Not the case. git clone from latest master.

Good, but check EOF's anyway - if git not configured properly (see core.autocrlf) there could
be wrong EOF's in files and command processor will not execute .bat files correctly.

Regards,
Vlad

Vlad Khorsun

non lue,
8 mai 2023, 17:40:5908/05/2023
à firebir...@googlegroups.com
08.05.2023 23:16, F. D.Castel wrote:
> You don't have to set it manually if run build in VS command prompt.
>
>
> Interestingly, you must use *x64 Native Tools Command Prompt for VS 2022**.*

Yes, I always use it. Or "x86 Native Tools Command Prompt for VS 2022" to
build for 32-bit (there is another small issue with it).

>
> Using *Developer Command Prompt for VS 2022 *instead gives another error during *make_boot*:
>
> Building ttmath (x64\release)...
> 'ml64.exe' is not recognized as an internal or external command,
> operable program or batch file.
>
> Error building ttmath_x64\release, see ttmath_x64\release_x64.log
>
>
> Investigating further: comparing the environment vars of both prompts it is clear that the later prompt setup a 32-bit environment.

Yes, you right. I never use "Developer Command Prompt" thus was not aware about
this issue.


Btw, setenvvar.bat uses PROCESSOR_ARCHITECTURE variable, but it always defined as
AMD64 - by "x64 Native Tools Command Prompt" and "by x86 Native Tools Command Prompt"
and even by "Developer Command Prompt". Looks like "Platform" variable should be used
instead - it have value "x64" and "x86" correspondingly. But it is defined by "Native
Tools Command Prompt"'s only.

Also, "Platform" variable was not defined by previous VS versions (VS 2013 at least).

Regards,
Vlad

Adriano dos Santos Fernandes

non lue,
8 mai 2023, 20:30:1408/05/2023
à firebir...@googlegroups.com
No, Firebird build do not depend on git.

The needed tools can be installed in different ways, so that ways can be
documented.


Adriano

Mark Rotteveel

non lue,
9 mai 2023, 04:37:0809/05/2023
à firebir...@googlegroups.com
On 08-05-2023 23:01, Vlad Khorsun wrote:
>   Good, but check EOF's anyway - if git not configured properly (see
> core.autocrlf) there could
> be wrong EOF's in files and command processor will not execute .bat
> files correctly.

Maybe .gitattributes should be used for this instead of relying on local
config or unix2dos.

Mark
--
Mark Rotteveel

Dimitry Sibiryakov

non lue,
9 mai 2023, 05:27:4409/05/2023
à firebir...@googlegroups.com
Adriano dos Santos Fernandes wrote 09.05.2023 2:30:
> No, Firebird build do not depend on git.
>
> The needed tools can be installed in different ways, so that ways can be
> documented.

Yes and GIT is one of such ways so build scripts can test and use it if
available.

--
WBR, SD.
Le message a été supprimé

F. D.Castel

non lue,
9 mai 2023, 10:49:5409/05/2023
à firebird-devel
> There is, however, a LegacyManagement.*epp*. Is there some kind of preprocessor required to build .cpp from .epp ?

Sure, it is preprocessed after creation of security database, look for following lines at console:

Create security5.fdb...
...
Creating metadata.fdb...
...
Processing alice/alice_meta.epp
Calling GPRE for alice/alice_meta.epp

Processing auth/SecurityDatabase/LegacyManagement.epp
Calling GPRE for auth/SecurityDatabase/LegacyManagement.epp
1 file(s) moved.
...

It took me some time to notice but the red line above wasn't showing in my output.



I'm still unable to find what's wrong. If anyone could bring a light, I made some changes in preprocess.bat to help:

::===========
:PREPROCESS
@echo Processing %1/%2.epp
@echo Calling GPRE for %1/%2.epp
@if "%3"=="" (call :GPRE_M %1 %2) else (call :GPRE_GDS %1 %2 %3 %4)

@if not exist %FB_GEN_DIR%\%1\%2.cpp (
    @echo FDCASTEL: %FB_GEN_DIR%\%1\%2.cpp does not exists.
    @move %FB_GEN_DIR%\preprocessing.cpp %FB_GEN_DIR%\%1\%2.cpp
    @if errorlevel 1 echo FDCASTEL: Error moving "%FB_GEN_DIR%\preprocessing.cpp" to "%FB_GEN_DIR%\%1\%2.cpp"
) else (
    @echo FDCASTEL: %FB_GEN_DIR%\%1\%2.cpp does exists.

    @fc %FB_GEN_DIR%\preprocessing.cpp %FB_GEN_DIR%\%1\%2.cpp
    @if errorlevel 1 (
        @echo FDCASTEL: "fc %FB_GEN_DIR%\preprocessing.cpp %FB_GEN_DIR%\%1\%2.cpp" errorlevel was = %ERRORLEVEL%.

        @move %FB_GEN_DIR%\preprocessing.cpp %FB_GEN_DIR%\%1\%2.cpp
        @if errorlevel 1 echo FDCASTEL: Error moving "%FB_GEN_DIR%\preprocessing.cpp" to "%FB_GEN_DIR%\%1\%2.cpp"
    )
)


(yeah, debugging CMD scripts is hell)



And did run everything with:

cd C:\Temp\firebird\builds\win32

.\clean_all.bat
.\make_icu.bat > make_icu_output.txt
.\make_boot.bat > make_boot_output.txt




What I did notice (in make_boot_output.txt) which may be significant was:

FDCASTEL: C:\Temp\firebird\gen\auth/SecurityDatabase\LegacyManagement.cpp does not exists.
FDCASTEL: Error moving "C:\Temp\firebird\gen\preprocessing.cpp" to "C:\Temp\firebird\gen\auth/SecurityDatabase\LegacyManagement.cpp"



I'm attaching 
- The changed preprocess.bat (remove .txt extension)
- all build result *.log from ./builds/win32; and 
- my *.txt outputs from the above execution.





win32-fdcastel.zip

Vlad Khorsun

non lue,
9 mai 2023, 18:40:1609/05/2023
à firebir...@googlegroups.com
09.05.2023 17:49, F. D.Castel wrote:

Could you run "mklink" in your build console ? It is used in make_boot.bat.

Looks like it not works for you, see below:

My build:

Create security5.fdb...
SQL> SQL> Apply security.sql...
symbolic link created for F:\FB2\fb50\gen\dbs\security.fdb <<===>> F:\FB2\fb50\gen\dbs\security5.fdb
Creating metadata.fdb...
SQL> SQL> symbolic link created for F:\FB2\fb50\gen\dbs\yachts.lnk <<===>> F:\FB2\fb50\gen\dbs\metadata.fdb
Preprocessing the entire source tree...



Your build:

Create security5.fdb...
SQL> SQL> Apply security.sql...
Creating metadata.fdb...
SQL> SQL> 1 file(s) copied.
Preprocessing the entire source tree...


This issue was discussed here, see thread "[firebird-devel] Build error with master branch and VS 2019"
started 7 Oct 2022.

The suggestion was:

> Probably, you could use suggestion from here:
>
> https://superuser.com/questions/129299/got-not-sufficient-privileges-message-in-cmd-when-logged-on-as-administrator
>


And the final solution:

> Build works after added my username to "Create symbolic links" in "Local Security Policy".

Regards,
Vlad

F. D.Castel

non lue,
10 mai 2023, 10:21:0310/05/2023
à firebird-devel
Jesus Christ!!! 

Yes! That was it, Vlad! 



Just running the x64 VS prompt as administrator made the build succeed. :')


That said, may I propose a new revision of the original doc for something around these lines?



---

1. Open a Powershell prompt as administrator

2. Install chocolatey -- https://chocolatey.org/install:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

3. Install required tools:

choco install unzip, sed, innosetup -y

4. Install Vistual Studio Community Edition 2022 with "Desktop development with C++ workload"

5. Run x64 Native Tools Command Prompt for VS 2022 from start menu as administrator (*)

6. From your firebird project root folder, run

cd .\builds\win32

.\clean_all.bat
.\make_icu.bat
.\make_boot.bat
.\make_all.bat

And you are done! The build output would be in .\output_x64_release from you root folder.

 (*) If you do not open the build prompt as administrator your build process may fail due to mklink permissions. 


---

Vlad Khorsun

non lue,
10 mai 2023, 18:07:1410/05/2023
à firebir...@googlegroups.com
10.05.2023 17:21, F. D.Castel wrote:
> Jesus Christ!!!
>
> *Yes! That was it, Vlad! *
> *
> *
> *
> *

:)

> Just *running the x64 VS prompt as administrator *made the build succeed. :')

What is your OS ? I can't find in docs what is default value for permissions
to create symbolic links. At my Win10 I start not elevated cmd and run

fsutil behavior query symlinkevaluation

Output is:

Local to local symbolic links are enabled.
Local to remote symbolic links are enabled.
Remote to local symbolic links are disabled.
Remote to remote symbolic links are disabled.

But on Win7 the same command returns "Access denied" error and works in elevated
command prompt only (with same output).

I uses admin account with UAC ON in both cases.

Also, we have no problem with our CI builds on github.

> That said, may I propose a new revision of the original doc for something around these lines?
>
>
>
> ---
>
> 1. Open a *Powershell* prompt *as administrator*
>
> 2. Install chocolatey -- https://chocolatey.org/install:
>
> Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol =
> [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object
> System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
>
> 3. Install required tools:
>
> choco install unzip, sed, innosetup -y

InnoSetup required only to build installer. It is not needed to build Firebird itself.

> 4. Install *Vistual Studio Community Edition 2022* with "*Desktop development with C++ workload*"
>
> 5. Run *x64 Native Tools Command Prompt for VS 2022 *from start menu *as administrator (*)*

I never run "VS prompt" as administrator and I don't think we should suggest this
for everyone to build Firebird. If we really have problem with usage of mklink, I
could return back usage of copy instead. Or use copy if mklink fails.

> 6. From your firebird project *root folder*, run
>
> cd .\builds\win32
>
> .\clean_all.bat
> .\make_icu.bat
> .\make_boot.bat
> .\make_all.bat
>
> And you are done! The build output would be in *.\output_x64_release* from you root folder.

Regards,
Vlad

Adriano dos Santos Fernandes

non lue,
10 mai 2023, 20:16:4210/05/2023
à firebir...@googlegroups.com,Vlad Khorsun
On 10/05/2023 19:07, Vlad Khorsun wrote:
>
>   What is your OS ? I can't find in docs what is default value for
> permissions
> to create symbolic links. At my Win10 I start not elevated cmd and run
>

Turning on developer mode didn't make it work?


Adriano


Adriano dos Santos Fernandes

non lue,
10 mai 2023, 20:18:2710/05/2023
à firebir...@googlegroups.com
On 10/05/2023 11:21, F. D.Castel wrote:
>
> 1. Open a *Powershell* prompt *as administrator*
>

You can document separately installation of prerequisites and build.

And certainly using administrator for the build is not the way to go.


Adriano

F. D.Castel

non lue,
10 mai 2023, 20:46:1210/05/2023
à firebird-devel
What is your OS ? I can't find in docs what is default value for permissions
to create symbolic links. At my Win10 I start not elevated cmd and run

 Windows 10 (Version 10.0.19044.2846)




fsutil behavior query symlinkevaluation

Output is:

Local to local symbolic links are enabled.
Local to remote symbolic links are enabled.
Remote to local symbolic links are disabled.
Remote to remote symbolic links are disabled.

It seems that my machine being member of a Windows Domain is the root cause.

My output:

NOTE: SymlinkEvaluation is currently controlled by group policy.
      Changes to this setting will be superceded by policy.

Local to local symbolic links are enabled.
Local to remote symbolic links are enabled.
Remote to local symbolic links are enabled.
Remote to remote symbolic links are enabled.



 
InnoSetup required only to build installer. It is not needed to build Firebird itself.

Sure. Just for the sake of completion.
 


> 5. Run *x64 Native Tools Command Prompt for VS 2022 *from start menu *as administrator (*)*

I never run "VS prompt" as administrator and I don't think we should suggest this
for everyone to build Firebird. If we really have problem with usage of mklink, I
could return back usage of copy instead. Or use copy if mklink fails.

Agreed.

Mark Rotteveel

non lue,
11 mai 2023, 04:01:1411/05/2023
à firebir...@googlegroups.com
On 11-05-2023 00:07, Vlad Khorsun wrote:
> 10.05.2023 17:21, F. D.Castel wrote:
>> Just *running the x64 VS prompt as administrator *made the build
>> succeed. :')
>
>   What is your OS ? I can't find in docs what is default value for
> permissions
> to create symbolic links. At my Win10 I start not elevated cmd and run
>
>     fsutil behavior query symlinkevaluation
>
> Output is:
>
> Local to local symbolic links are enabled.
> Local to remote symbolic links are enabled.
> Remote to local symbolic links are disabled.
> Remote to remote symbolic links are disabled.

That setting just controls whether or not NTFS supports and resolves
symbolic links.

> But on Win7 the same command returns "Access denied" error and works in
> elevated
> command prompt only (with same output).
>
>   I uses admin account with UAC ON in both cases.
>
>   Also, we have no problem with our CI builds on github.

As far as I know, the default, even on Windows 10 and 11, is that mklink
requires administrator privileges, but you can configure allowed users
in the Group Policy editor under Local Computer Policy > Computer
Configuration > Windows Settings > Security Settings > Local Policies >
User Rights Assignment, right "Create symbolic links".

Alternatively, enabling developer mode should also allow you to create
symbolic links without administrator elevation.

If a domain policy is used, it might need to be configured through the
domain policy.

Mark
--
Mark Rotteveel

Vlad Khorsun

non lue,
11 mai 2023, 06:18:1211/05/2023
à firebir...@googlegroups.com
Seems it should: I have developer mode on and when I switched it off I'm unable
to create symlinks anymore. Switched back to on - and all is OK again. Fortunately,
changing this mode doesn't requires restart.


Regards,
Vlad
Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message