Ah, sorry - this probably should be opened on your fork of vcpkg, can this be moved easily?
Searching shows there's a hardcoded version in a couple of files for some reason:
vcpkg/scripts/cmake/vcpkg_acquire_msys.cmake
534: URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libwinpthread-git-8.0.0.5906.c9a21571-1-any.pkg.tar.zst"
vcpkg/scripts/cmake/vcpkg_find_fortran.cmake
54: "https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-8.0.0.5906.c9a21571-1-any.pkg.tar.zst"
92: "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libwinpthread-git-8.0.0.5906.c9a21571-1-any.pkg.tar.zst"
9b4b96d989615aeddaf141b93f82afb8c1eecf7b
Attempt to load the project in VS2022. Initialisation fails. vcpkg-bootstrap.log vcpkg-manifest-install.log
Prerequisites download successfully, able to begin the build
Windows 10
No response
This is https://github.com/DapperLib/Dapper/pull/471 (thanks @pzavolinsky), fixed to work with current main
and with a test added.
Tests: Bump Microsoft.Data.Sqlite Include SQLitePCLRaw.bundle_e_sqlite3 2.1.0 for STRICT support
Dapper.SqlMapper.AddTypeHandler is not working as I would expect.
You will need to add the following PackageReference
to your csproj (see https://github.com/dotnet/efcore/issues/28124), but this issue is related to the mapping itself, not the strict table support - strict tables just show the problem better.
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="2.1.0" />
using Microsoft.Data.Sqlite;
using System.Data;
using Dapper;
namespace BugReport
{
public class DateTimeToTimestampHandler : SqlMapper.TypeHandler<DateTimeOffset?>
{
public override void SetValue(IDbDataParameter parameter, DateTimeOffset? value)
{
Console.WriteLine($"SetValue was hit, input value is {value.Value}");
parameter.Value = value.Value.ToUnixTimeSeconds();
}
public override DateTimeOffset? Parse(object value)
{
Console.WriteLine($"Parse was hit, input value is {value} - converted to {DateTimeOffset.FromUnixTimeSeconds((long)value)}");
return DateTimeOffset.FromUnixTimeSeconds((long)value);
}
}
public class BugReport
{
public static void Main()
{
DateTimeOffset? myTimestamp = DateTimeOffset.UtcNow;
Dapper.SqlMapper.AddTypeHandler(new DateTimeToTimestampHandler());
var connection = new SqliteConnection("Data Source=:memory:");
connection.Open();
SQLitePCL.raw.sqlite3_trace(connection.Handle, (_, statement) => Console.WriteLine($"Sent to SQLite: {statement}"), null);
Console.WriteLine("SQLite version is " + connection.ExecuteScalar("SELECT sqlite_version()"));
connection.Execute("CREATE TABLE BugReport (ThisIsAnIntColumn INTEGER) STRICT");
connection.Execute("INSERT INTO BugReport Values (1653915600)");
var firstSelect = connection.Query<DateTimeOffset?>("SELECT * FROM BugReport");
Console.WriteLine($"Mapped result is {firstSelect.First()}");
try
{
connection.Execute("INSERT INTO BugReport VALUES (@MyTimestamp)", new { MyTimestamp = myTimestamp });
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
}
}
Expected: DateTimeToTimestampHandler.SetValue
is called, INTEGER (long) value inserted into the table
Actual:
Sent to SQLite: SELECT sqlite_version()
SQLite version is 3.38.3
Sent to SQLite: CREATE TABLE BugReport (ThisIsAnIntColumn INTEGER) STRICT
Sent to SQLite: INSERT INTO BugReport Values (1653915600)
Sent to SQLite: SELECT * FROM BugReport
Parse was hit, input value is 1653915600 - converted to 30/05/2022 1:00:00 PM +00:00
Mapped result is 30/05/2022 1:00:00 PM +00:00
Sent to SQLite: INSERT INTO BugReport VALUES ('2022-05-30 13:03:01.4304754+00:00')
SQLite Error 19: 'cannot store TEXT value in INTEGER column BugReport.ThisIsAnIntColumn'.
SetValue is never called, and ToString is called on the DateTimeOffset instead.
I'm using the following versions:
<PackageReference Include="Dapper" Version="2.0.123" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="6.0.5" />
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="2.1.0" />
on .NET 6.
I see we're waiting for https://github.com/DapperLib/Dapper/pull/471, I guess this means I'll need to have my own fork of Dapper for now.
Similar to https://github.com/DapperLib/Dapper/issues/1728?
It looks like Dapper.SqlMapper.LookupDbType(System.Type type, string name, bool demand, out Dapper.SqlMapper.ITypeHandler handler) will never actually resolve my type handler.
@ajcvickers there's an updated version, https://www.nuget.org/packages/SQLitePCLRaw.core/ is at 2.1.0
Here's a tricky one.
You will need to add the following PackageReference
to your csproj (see https://github.com/dotnet/efcore/issues/28124), but this issue is related to the mapping itself, not the strict table support - strict tables just show the problem better.
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="2.1.0" />
using Microsoft.Data.Sqlite;
using System.Data;
using Dapper;
namespace BugReport
{
public class DateTimeToTimestampHandler : SqlMapper.TypeHandler<DateTimeOffset?>
{
public override void SetValue(IDbDataParameter parameter, DateTimeOffset? value)
{
Console.WriteLine($"SetValue was hit, input value is {value.Value}");
parameter.Value = value.Value.ToUnixTimeSeconds();
}
public override DateTimeOffset? Parse(object value)
{
Console.WriteLine($"Parse was hit, input value is {value} - converted to {DateTimeOffset.FromUnixTimeSeconds((long)value)}");
return DateTimeOffset.FromUnixTimeSeconds((long)value);
}
}
public class BugReport
{
public static void Main()
{
DateTimeOffset? myTimestamp = DateTimeOffset.UtcNow;
Dapper.SqlMapper.AddTypeHandler(new DateTimeToTimestampHandler());
var connection = new SqliteConnection("Data Source=:memory:");
connection.Open();
SQLitePCL.raw.sqlite3_trace(connection.Handle, (_, statement) => Console.WriteLine($"Sent to SQLite: {statement}"), null);
Console.WriteLine("SQLite version is " + connection.ExecuteScalar("SELECT sqlite_version()"));
connection.Execute("CREATE TABLE BugReport (ThisIsAnIntColumn INTEGER) STRICT");
connection.Execute("INSERT INTO BugReport Values (1653915600)");
var firstSelect = connection.Query<DateTimeOffset?>("SELECT * FROM BugReport");
Console.WriteLine($"Mapped result is {firstSelect.First()}");
try
{
connection.Execute("INSERT INTO BugReport VALUES (@MyTimestamp)", new { MyTimestamp = myTimestamp });
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
}
}
Expected: DateTimeToTimestampHandler.SetValue
is called, INTEGER (long) value inserted into the table
Actual:
Sent to SQLite: SELECT sqlite_version()
SQLite version is 3.38.3
Sent to SQLite: CREATE TABLE BugReport (ThisIsAnIntColumn INTEGER) STRICT
Sent to SQLite: INSERT INTO BugReport Values (1653915600)
Sent to SQLite: SELECT * FROM BugReport
Parse was hit, input value is 1653915600 - converted to 30/05/2022 1:00:00 PM +00:00
Mapped result is 30/05/2022 1:00:00 PM +00:00
Sent to SQLite: INSERT INTO BugReport VALUES ('2022-05-30 13:03:01.4304754+00:00')
SQLite Error 19: 'cannot store TEXT value in INTEGER column BugReport.ThisIsAnIntColumn'.
SetValue is never called, and ToString is called on the DateTimeOffset instead.
I'm using the following versions:
<PackageReference Include="Dapper" Version="2.0.123" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="6.0.5" />
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="2.1.0" />
It looks like the process to update e_sqlite3.dll is quite involved and seemingly requires a build of https://github.com/ericsink/SQLitePCL.raw. cc @ericsink
@roji Thanks! Looked straight past the azure-pipelines.yml. Oops!
Thanks for the pointer to the local build instructions, too.
Side question: how is Microsoft.Data.Sqlite built? I don't see it in the GitHub actions - for the experiments and side projects I'm working on, I'd be happy to build my own with a newer sqlite.
tl;dr can you please update the underlying sqlite library to at least 3.37.0?
CREATE TABLE ... STRICT does not appear to be working in Microsoft.Data.Sqlite
See https://www.sqlite.org/stricttables.html. This feature requires SQLite 3.37.0 (2021-11-27)
Command line:
sqlite3.exe -cmd "CREATE TABLE MyTable (MyID INTEGER) STRICT;"
SQLite version 3.37.1 2021-12-30 15:30:28
Enter ".help" for usage hints.
sqlite> .schema MyTable
CREATE TABLE MyTable (MyID INTEGER) STRICT;
sqlite> .quit
(via LinqPad, using statements not included )
void Main()
{
var connection = new SqliteConnection("Data Source=:memory:");
connection.Open();
var command = connection.CreateCommand();
command.CommandText = "CREATE TABLE MyTable (MyID INTEGER) STRICT";
command.ExecuteNonQuery();
}
SQLite Error 1: 'near "STRICT": syntax error'.
at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
at Microsoft.Data.Sqlite.SqliteCommand.PrepareAndEnumerateStatements(Stopwatch timer)+MoveNext()
at Microsoft.Data.Sqlite.SqliteCommand.GetStatements(Stopwatch timer)+MoveNext()
at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader()
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteNonQuery()
at UserQuery.Main(), line 7
Microsoft.Data.Sqlite version:
I have tried
Microsoft.Data.Sqlite 6.0.5 SQLitePCLRaw.lib.e_sqlite3 2.0.6 SQLitePCLRaw.provider.e_sqlite3 2.0.6
and Microsoft.Data.Sqlite 7.0.0-preview.4.22229.2 SQLitePCLRaw.bundle_e_sqlite3 2.0.8-pre20220111224339 SQLitePCLRaw.core 2.0.8-pre20220111224339
SELECT sqlite_version() from the included library shows 3.35.5
for both stable and prerelease
Target framework: (e.g. .NET 5.0): .NET 6 or .NET 7 Operating system: Windows 11
Is your feature request related to a problem? Please describe. I tried updating the SQLite3 port to the latest version
diff --git a/ports/sqlite3/portfile.cmake b/ports/sqlite3/portfile.cmake
index 30ef7c855..393da5958 100644
--- a/ports/sqlite3/portfile.cmake
+++ b/ports/sqlite3/portfile.cmake
@@ -1,10 +1,10 @@
# Be sure to update both of these versions together.
-set(SQLITE_VERSION 3370100)
-set(PKGCONFIG_VERSION 3.37.1)
-set(SQLITE_HASH b59343772dc4c6bb8e05fff6206eeb44861efa52c120c789ce6b733e974cf950657b6ab369aa405d75f45ed9cf1cb8128a76447bc63e9ce9822578d71581a7a3)
+set(SQLITE_VERSION 3380500)
+set(PKGCONFIG_VERSION 3.38.5)
+set(SQLITE_HASH 4fc2992e4c1ca1664a9b01e07c9b944003c4ed0612978e471eff262a7114e4a0699244d91e71ae4ad2b5e1fc9829917cd7d5f0313aa5859036905f974548d94a)
vcpkg_download_distfile(ARCHIVE
- URLS "https://sqlite.org/2021/sqlite-amalgamation-${SQLITE_VERSION}.zip"
+ URLS "https://sqlite.org/2022/sqlite-amalgamation-${SQLITE_VERSION}.zip"
FILENAME "sqlite-amalgamation-${SQLITE_VERSION}.zip"
SHA512 ${SQLITE_HASH}
)
diff --git a/ports/sqlite3/vcpkg.json b/ports/sqlite3/vcpkg.json
index f59f84fc6..5031dfe40 100644
--- a/ports/sqlite3/vcpkg.json
+++ b/ports/sqlite3/vcpkg.json
@@ -1,6 +1,6 @@
{
"name": "sqlite3",
- "version": "3.37.2",
+ "version": "3.38.5",
"port-version": 1,
"description": "SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.",
"homepage": "https://github.com/sqlite/sqlite",
But the build fails with
Building package sqlite3[core,tool]:x64-windows...
[DEBUG] CreateProcessW("C:\vcpkg\downloads\tools\cmake-3.22.2-windows\cmake-3.22.2-windows-i386\bin\cmake.exe" "-DALL_FEATURES=fts3;fts4;fts5;geopoly;json1;limit;math;memsys3;memsys5;omit-load-extension;rtree;session;tool;zlib;" -DCURRENT_PORT_DIR=C:/vcpkg/ports/sqlite3 -D_HOST_TRIPLET=x64-windows "-DFEATURES=core;tool" -DPORT=sqlite3 -DVCPKG_USE_HEAD_VERSION=0 -D_VCPKG_DOWNLOAD_TOOL=BUILT_IN -D_VCPKG_EDITABLE=0 -D_VCPKG_NO_DOWNLOADS=0 -DZ_VCPKG_CHAINLOAD_TOOLCHAIN_FILE=C:/vcpkg/scripts/toolchains/windows.cmake -DCMD=BUILD -DDOWNLOADS=C:/vcpkg/downloads -DTARGET_TRIPLET=x64-windows -DTARGET_TRIPLET_FILE=C:/vcpkg/triplets/x64-windows.cmake -DVCPKG_BASE_VERSION=2022-03-09 -DVCPKG_CONCURRENCY=17 -DVCPKG_PLATFORM_TOOLSET=v143 "-DGIT=C:/Program Files/Git/cmd/git.exe" -DVCPKG_ROOT_DIR=C:/vcpkg -DPACKAGES_DIR=C:/vcpkg/packages -DBUILDTREES_DIR=C:/vcpkg/buildtrees -D_VCPKG_INSTALLED_DIR=C:/vcpkg/installed -DDOWNLOADS=C:/vcpkg/downloads -DVCPKG_MANIFEST_INSTALL=OFF -P "C:\vcpkg\scripts\ports.cmake")
-- Using cached sqlite-amalgamation-3380500.zip.
-- Cleaning sources at C:/vcpkg/buildtrees/sqlite3/src/3380500-644228d9c8.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/vcpkg/downloads/sqlite-amalgamation-3380500.zip
-- Applying patch fix-arm-uwp.patch
-- Using source at C:/vcpkg/buildtrees/sqlite3/src/3380500-644228d9c8.clean
CMake Error at ports/sqlite3/portfile.cmake:41 (vcpkg_cmake_configure):
Unknown CMake command "vcpkg_cmake_configure".
Call Stack (most recent call first):
scripts/ports.cmake:145 (include)
[DEBUG] ReadFile() finished with GetLastError(): 109
[DEBUG] 14808: cmd_execute_and_stream_data() returned 1 after 321434 us
Error: Building package sqlite3:x64-windows failed with: BUILD_FAILED
[DEBUG] CreateProcessW("C:\Program Files\Git\cmd\git.exe" "--git-dir=C:\vcpkg\.git" "--work-tree=C:\vcpkg\.git" -c core.autocrlf=false show "--pretty=format:%h %cd (%cr)" -s --date=short HEAD)
[DEBUG] ReadFile() finished with GetLastError(): 109
[DEBUG] 14808: cmd_execute_and_stream_data() returned 0 after 30275 us
Please ensure you're using the latest portfiles with `git pull` and `.\vcpkg update`.
Then check for known issues at:
https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+sqlite3
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[sqlite3]+Build+error
including:
package: sqlite3[core,tool]:x64-windows -> 3.38.5#1
vcpkg-tool version: 2022-03-09-1affd32f93b299d5a907816c328ca3ededb73a7e
vcpkg-scripts version: a5d6d1451 2022-05-06 (4 hours ago)
Proposed solution Someone who knows how vcpkg works to update it
Describe alternatives you've considered Staying on the current version.
Additional context Add any other context or screenshots about the feature request here.
When I retried this, it worked - sorry for the delay and thanks for the help.
I can't use xcaddy to build with this version - can this please be merged?
2022/05/22 15:16:40 [INFO] exec (timeout=0s): /usr/bin/go get -d -v github.com/fedorg/caddy-json-schema@c337bcc4a3ba9c1a34dd606f7e1656a9c01124c4 github.com/caddyserver/caddy/v2@v2.5.1
go: downloading github.com/fedorg/caddy-json-schema v1.0.2
go: github.com/fedorg/caddy-json-schema@v1.0.2: parsing go.mod:
module declares its path as: github.com/abiosoft/caddy-json-schema
but was required as: github.com/fedorg/caddy-json-schema
2022/05/22 15:16:49 [FATAL] exit status 1
When filing a bug, please include the following headings if possible. Any example text in this template can be deleted.
A paragraph or two about the issue you're experiencing.
Steps to reproduce this issue
From packer version
If the file is longer than a few dozen lines, please include the URL to the gist of the log or use the Github detailed format instead of posting it directly in the issue.
Brand new Windows 11 install. Haven't tested this on Windows 10.
OS, Architecture, and any other information you can provide about the environment.
1.7.10
PS C:\temp> packer-1.7.10.exe build .\zz_local_testing.pkr.hcl
hyperv-iso.autogenerated_1: output will be in this color. ==> hyperv-iso.autogenerated_1: Creating build directory... ==> hyperv-iso.autogenerated_1: Retrieving ISO ==> hyperv-iso.autogenerated_1: Trying http://mirror.aarnet.edu.au/pub/ubuntu/releases/20.04.4/ubuntu-20.04.4-live-server-amd64.iso ==> hyperv-iso.autogenerated_1: Trying http://mirror.aarnet.edu.au/pub/ubuntu/releases/20.04.4/ubuntu-20.04.4-live-server-amd64.iso?checksum=sha256%3A28ccdb56450e643bad03bb7bcf7507ce3d8d90e8bf09e38f6bd9ac298a98eaad ==> hyperv-iso.autogenerated_1: http://mirror.aarnet.edu.au/pub/ubuntu/releases/20.04.4/ubuntu-20.04.4-live-server-amd64.iso?checksum=sha256%3A28ccdb56450e643bad03bb7bcf7507ce3d8d90e8bf09e38f6bd9ac298a98eaad => C:\temp\packer_cache\47de2d7266acde194681de2a24f5d76b43b452ca.iso
==> hyperv-iso.autogenerated_1: Starting HTTP server on port 8592
==> hyperv-iso.autogenerated_1: Creating switch 'packer-autogenerated_1' if required...
==> hyperv-iso.autogenerated_1: switch 'packer-autogenerated_1' already exists. Will not delete on cleanup...
==> hyperv-iso.autogenerated_1: Creating virtual machine...
==> hyperv-iso.autogenerated_1: Enabling Integration Service...
==> hyperv-iso.autogenerated_1: Setting boot drive to os dvd drive C:\temp\packer_cache\47de2d7266acde194681de2a24f5d76b43b452ca.iso ...
==> hyperv-iso.autogenerated_1: Mounting os dvd drive C:\temp\packer_cache\47de2d7266acde194681de2a24f5d76b43b452ca.iso ...
==> hyperv-iso.autogenerated_1: Skipping mounting Integration Services Setup Disk...
==> hyperv-iso.autogenerated_1: Mounting secondary DVD images...
==> hyperv-iso.autogenerated_1: Configuring vlan...
==> hyperv-iso.autogenerated_1: Determine Host IP for HyperV machine...
==> hyperv-iso.autogenerated_1: Host IP for the HyperV machine: 169.254.189.124
==> hyperv-iso.autogenerated_1: Attempting to connect with vmconnect...
==> hyperv-iso.autogenerated_1: Starting the virtual machine...
==> hyperv-iso.autogenerated_1: Waiting 1s for boot...
==> hyperv-iso.autogenerated_1: Typing the boot command...
Cancelling build after receiving interrupt
==> hyperv-iso.autogenerated_1: Error running boot command: context canceled
==> hyperv-iso.autogenerated_1: Disconnecting from vmconnect...
==> hyperv-iso.autogenerated_1: Clean up os dvd drive...
==> hyperv-iso.autogenerated_1: Unregistering and deleting virtual machine...
==> hyperv-iso.autogenerated_1: Deleting output directory...
==> hyperv-iso.autogenerated_1: Deleting build directory...
Build 'hyperv-iso.autogenerated_1' errored after 20 seconds 785 milliseconds: Error running boot command: context canceled
==> Wait completed after 20 seconds 785 milliseconds
Cleanly cancelled builds after being interrupted.
PS C:\temp>
(error is expected, I cancelled once it got to the grub boot screen)
1.8.0:
PS C:\temp> packer build .\zz_local_testing.pkr.hcl
hyperv-iso.autogenerated_1: output will be in this color.
==> hyperv-iso.autogenerated_1: Creating build directory...
==> hyperv-iso.autogenerated_1: Retrieving ISO
==> hyperv-iso.autogenerated_1: Trying http://mirror.aarnet.edu.au/pub/ubuntu/releases/20.04.4/ubuntu-20.04.4-live-server-amd64.iso
==> hyperv-iso.autogenerated_1: Trying http://mirror.aarnet.edu.au/pub/ubuntu/releases/20.04.4/ubuntu-20.04.4-live-server-amd64.iso?checksum=sha256%3A28ccdb56450e643bad03bb7bcf7507ce3d8d90e8bf09e38f6bd9ac298a98eaad
==> hyperv-iso.autogenerated_1: http://mirror.aarnet.edu.au/pub/ubuntu/releases/20.04.4/ubuntu-20.04.4-live-server-amd64.iso?checksum=sha256%3A28ccdb56450e643bad03bb7bcf7507ce3d8d90e8bf09e38f6bd9ac298a98eaad => C:\temp\packer_cache\47de2d7266acde194681de2a24f5d76b43b452ca.iso
==> hyperv-iso.autogenerated_1: Starting HTTP server on port 8845
==> hyperv-iso.autogenerated_1: Creating switch 'packer-autogenerated_1' if required...
==> hyperv-iso.autogenerated_1: switch 'packer-autogenerated_1' already exists. Will not delete on cleanup...
==> hyperv-iso.autogenerated_1: Creating virtual machine...
==> hyperv-iso.autogenerated_1: Enabling Integration Service...
==> hyperv-iso.autogenerated_1: Setting boot drive to os dvd drive C:\temp\packer_cache\47de2d7266acde194681de2a24f5d76b43b452ca.iso ...
==> hyperv-iso.autogenerated_1: Mounting os dvd drive C:\temp\packer_cache\47de2d7266acde194681de2a24f5d76b43b452ca.iso ...
==> hyperv-iso.autogenerated_1: Skipping mounting Integration Services Setup Disk...
==> hyperv-iso.autogenerated_1: Mounting secondary DVD images...
==> hyperv-iso.autogenerated_1: Configuring vlan...
==> hyperv-iso.autogenerated_1: Determine Host IP for HyperV machine...
==> hyperv-iso.autogenerated_1: Error getting host adapter ip address: No ip address.
==> hyperv-iso.autogenerated_1: Clean up os dvd drive...
==> hyperv-iso.autogenerated_1: Unregistering and deleting virtual machine...
==> hyperv-iso.autogenerated_1: Deleting output directory...
==> hyperv-iso.autogenerated_1: Deleting build directory...
Build 'hyperv-iso.autogenerated_1' errored after 12 seconds 487 milliseconds: Error getting host adapter ip address: No ip address.
==> Wait completed after 12 seconds 487 milliseconds
==> Some builds didn't complete successfully and had errors:
--> hyperv-iso.autogenerated_1: Error getting host adapter ip address: No ip address.
==> Builds finished but no artifacts were created.
When filing a bug, please include the following headings if possible. Any example text in this template can be deleted.
If capslock is on on the host, the wrong characters are sent to Hyper-V.
A paragraph or two about the issue you're experiencing.
#hit capslock
packer build my_file.pkr.hcl
From packer version
source "hyperv-iso" "autogenerated_1" {
boot_wait = "1s"
boot_command = [
"<esc><wait5><esc><esc><enter><wait>",
"set gfxpayload=keep<enter>",
"linux /casper/vmlinuz ",
"debug autoinstall 'ds=nocloud-net;s=http://10.0.0.144:8000/' --- <enter>",
"noprompt autoinstall 'ds=nocloud-net;s=http://10.0.0.144:8000/' --- <enter>",
"initrd /casper/initrd<enter>",
"boot<enter>"]
communicator = "ssh"
cpus = "4"
disk_size = "20000"
enable_secure_boot = false
generation = 2
guest_additions_mode = "disable"
http_directory = "./local-testing/"
iso_checksum = "file:https://mirror.aarnet.edu.au/pub/ubuntu/releases/20.04.4/SHA256SUMS"
iso_url = "http://mirror.aarnet.edu.au/pub/ubuntu/releases/20.04.4/ubuntu-20.04.4-live-server-amd64.iso"
#iso_checksum = "file:https://mirror.aarnet.edu.au/pub/ubuntu/releases/22.04/SHA256SUMS"
#iso_url = "http://mirror.aarnet.edu.au/pub/ubuntu/releases/22.04/ubuntu-22.04-live-server-amd64.iso"
memory = "4096"
shutdown_command = "echo 'packer' | sudo -S -E shutdown -P now"
ssh_password = "packer"
ssh_timeout = "4h"
ssh_username = "packer"
vm_name = "${var.vm_name}"
}
build {
sources = ["source.hyperv-iso.autogenerated_1"]
### Operating system and Environment details
Windows 11, Packer 1.7.8 (because 1.8.0 fails with another bug I'm about to raise)
### Log Fragments and crash.log files
Include appropriate log fragments. If the log is longer than a few dozen lines,
please include the URL to the [gist](https://gist.github.com/) of the log or
use the [Github detailed format](https://gist.github.com/ericclemmons/b146fe5da72ca1f706b2ef72a20ac39d) instead of posting it directly in the issue.
Set the env var `PACKER_LOG=1` for maximum log detail.
Library name: curl
New version number: 7.83.1
https://curl.se/changes.html
https://daniel.haxx.se/blog/2022/05/11/curl-7-83-1-it-burns/
Contains security updates
I am trying to load https://github.com/voltagex-forks/sqlite_zstd_vfs (which is https://github.com/mlin/sqlite_zstd_vfs made to build on Windows). The extension appears to load, but the vfs is not found.
The vfs requires particular URI parameters to be configured, see https://github.com/mlin/sqlite_zstd_vfs#performance
I cannot find any examples of loading or using a VFS extension with Microsoft.Data.Sqlite.
SqliteConnection conn = new SqliteConnection("Data Source=:memory:");
conn.EnableExtensions(true);
conn.LoadExtension(@".\lib\zstd_vfs.dll", "sqlite3_zstdvfs_init");
conn.ConnectionString = "Data Source=file:test2.db?vfs=zstd&outer_unsafe=true";
conn.Open();
throws
Microsoft.Data.Sqlite.SqliteException
HResult=0x80004005
Message=SQLite Error 1: 'no such vfs: zstd'.
Source=Microsoft.Data.Sqlite
StackTrace:
at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
at Microsoft.Data.Sqlite.SqliteConnectionInternal..ctor(SqliteConnectionStringBuilder connectionOptions, SqliteConnectionPool pool)
at Microsoft.Data.Sqlite.SqliteConnectionPool.GetConnection()
at Microsoft.Data.Sqlite.SqliteConnectionFactory.GetConnection(SqliteConnection outerConnection)
at Microsoft.Data.Sqlite.SqliteConnection.Open()
at Test.Program.Main(String[] args) in C:\git\test\Program.cs:line 17
Microsoft.Data.Sqlite version: 6.0.4 Target framework: NET 6 Operating system: Windows 10 21H2
Thank you, loading the extension, opening the connection, closing the connection and opening the connection with the "final" connection string works. Much appreciated, @bricelam.
I am trying to load https://github.com/voltagex-forks/sqlite_zstd_vfs (which is https://github.com/mlin/sqlite_zstd_vfs made to build on Windows). The extension appears to load, but the vfs is not found.
The vfs requires particular URI parameters to be configured, see https://github.com/mlin/sqlite_zstd_vfs#performance
I cannot find any examples of loading or using a VFS extension with Microsoft.Data.Sqlite.
SqliteConnection conn = new SqliteConnection("Data Source=:memory:");
conn.EnableExtensions(true);
conn.LoadExtension(@".\lib\zstd_vfs.dll", "sqlite3_zstdvfs_init");
conn.ConnectionString = "Data Source=file:test2.db?vfs=zstd&outer_unsafe=true";
conn.Open();
throws
Microsoft.Data.Sqlite.SqliteException
HResult=0x80004005
Message=SQLite Error 1: 'no such vfs: zstd'.
Source=Microsoft.Data.Sqlite
StackTrace:
at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
at Microsoft.Data.Sqlite.SqliteConnectionInternal..ctor(SqliteConnectionStringBuilder connectionOptions, SqliteConnectionPool pool)
at Microsoft.Data.Sqlite.SqliteConnectionPool.GetConnection()
at Microsoft.Data.Sqlite.SqliteConnectionFactory.GetConnection(SqliteConnection outerConnection)
at Microsoft.Data.Sqlite.SqliteConnection.Open()
at Test.Program.Main(String[] args) in C:\git\test\Program.cs:line 17
Microsoft.Data.Sqlite version: 6.0.4 Target framework: NET 6 Operating system: Windows 10 21H2