[edk2-platforms]Vlv2TbltDevicePkg built failed for 'error: symbol `InternalX86DisablePaging64.0' undefined' - uefi

I compiled Vlv2TbltDevicePkg and operated according to the following URL:
https://github.com/tianocore/edk2-platforms/tree/master/Platform/Intel/Vlv2TbltDevicePkg
The compiled command is as follows:
build -a IA32 -a X64 -n 5 -t VS2019 -b DEBUG -p Vlv2TbltDevicePkg\PlatformPkgX64.dsc
The result is the following error message:
edk2p\Build\Vlv2TbltDevicePkgX64\DEBUG_VS2010x86\X64\MdePkg\Library\BaseLib\BaseLib\OUTPUT\X64\DisablePaging64.iii:35: error: symbol `InternalX86DisablePaging64.0' undefined
NMAKE : fatal error U1077: 'c:\nasm\nasm.EXE' : return code '0x1'
My version of Nasm is nasm-2.13.03, how can I solve the error about nasm?
Any suggestion is greatly appreciated!
Thanks!

I update nams to v2.15.05. It works fine!

Related

Osm2pgsql failed due to ERROR: Error loading lua config: ...l/share/lua/5.2/osml10n/get_localized_name_from_tags.lua:1: module 'unaccent' not found

i am using this project from github :( https://github.com/giggls/osml10n/blob/master )
i have completed all the installation steps but when i run this command (:osm2pgsql -G -O flex -d osm -S openstreetmap-carto-hstore-only-l10n.lua ../openstreetmap-carto-de/data/gcc-states-latest.osm.pbf
) i have the following error can anyone tell me how can u fix it.
ERROR (
Osm2pgsql failed due to ERROR: Error loading lua config:...l/share/lua/5.2/osml10n/get_localized_name_from_tags.lua:1: module 'unaccent' not found:
no field package.preload['unaccent
no file '/usr/local/share/lua/5.2/unaccent.lua'
no file '/usr/local/share/lua/5.2/unaccent/init.lua'
no file '/usr/local/lib/lua/5.2/unaccent.lua')

How to fix "pytest: error: unrecognized arguments: -n"

Hi I am trying to run my tests parallely(pytest-xdist) on the azure pipelines.
Till now the tests were running perfectly fine.
Suddenly the pytest is throwing a weird error saying "unrecognized argument".
The file name : integration_test.py
Command used : pytest -n 5 --tb=short integration_test.py -v -s --> to run 5 tests parallely
Total number of tests : 57
Versions :
pytest==6.2.5
pytest-xdist==2.3.0
Even tried with the latest versions of these 2 modules.
Error :
ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: -n integration_test.py
How can I overcome this error?
This error is what you encountered:
As hoefling mentioned, the solution is to install the pytest-xdist:
pip install pytest-xdist
On MacOS just running pytest might be ran by a different Python's version than you thought.
$ pytest
============================================================================== test session starts ===============================================================================
platform darwin -- Python 3.9.12, pytest-6.2.5, py-1.10.0, pluggy-0.13.1
rootdir: [REDACTED]
plugins: anyio-3.5.0, cov-3.0.0
While
$ python3 -m pytest
============================================================================== test session starts ===============================================================================
platform darwin -- Python 3.10.6, pytest-7.1.2, pluggy-1.0.0
rootdir: [REDACTED]
plugins: xdist-2.5.0, forked-1.4.0, pylama-8.4.1
Be careful, and launch it as a module :)

How to solution the following error when build EmulatorPkg ?

when I run build -p EmulatorPkg\EmulatorPkg.dsc -t VS2019 -a X64, it show the following error
LINK : warning LNK4108:ָ /ALIGN ûָ /DRIVERӳܲ
LINK : warning LNK4001: δָļʹÿ
LINK : warning LNK4068: δָ /MACHINEĬΪ X86
LINK : error LNK2001: ޷ⲿ _ModuleEntryPoint
d:\edk2\edk2\Build\EmulatorX64\DEBUG_VS2019\X64\WinHost.lib : fatal error LNK1120: 1 ޷ⲿ
NMAKE : fatal error U1077: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\
MSVC\14.25.28610\bin\Hostx86\x64\link.exe": ش롰0x460
Stop.
Building ... d:\edk2\edk2\EmulatorPkg\BootModePei\BootModePei.inf [X64]
build.py...
: error 7000: Failed to execute command
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.25.28610\bin
\Hostx86\x86\nmake.exe /nologo tbuild [d:\edk2\edk2\Build\EmulatorX64\DEBUG_VS2019\X64\EmulatorPkg\Win
\Host\WinHost]
build.py...
: error F002: Failed to build module
d:\edk2\edk2\EmulatorPkg\Win\Host\WinHost.inf [X64, VS2019, DEBUG]
- Failed -
Build end time: 22:18:35, Apr.07 2020
Build total time: 00:00:13
but when build MdeModulePkg/MdeModulePkg.dsc, it not have any error.
The error was caused by missing support for VS2019 in this module.
Support was added upstream in commit 998d4c98b7c6 ("EmulatorPkg/WinHost: Add link flags for VS2019 tool chains.").

How to build Swift project on NixOS?

I'm trying to build a simple Swift project on NixOS. Here are the steps to reproduce:
git clone https://github.com/PerfectlySoft/PerfectTemplate.git
cd PerfectTemplate
touch shell.nix
Add shell.nix with following contents:
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "swift-env";
buildInputs = [
openssl
stdenv
binutils
cmake
pkgconfig
curl
glibc
icu
libblocksruntime
libbsd
libedit
libuuid
libxml2
ncurses
sqlite
swig
];
}
Running nix-shell --pure shell.nix and from there swift build, gives me:
gcc: error: x86_64-unknown-linux: No such file or directory
gcc: error: unrecognized command line option ‘-target’
gcc: error: unrecognized command line option ‘-fblocks’
gcc: error: x86_64-unknown-linux: No such file or directory
gcc: error: unrecognized command line option ‘-fmodules’; did you mean ‘-fmudflap’?
gcc: error: x86_64-unknown-linux: No such file or directory
gcc: error: x86_64-unknown-linux: No such file or directory
gcc: error: x86_64-unknown-linux: No such file or directory
gcc: error: x86_64-unknown-linux: No such file or directory
gcc: error: unrecognized command line option ‘-target’
gcc: error: x86_64-unknown-linux: No such file or directory
gcc: error: unrecognized command line option ‘-fblocks’
gcc: error: unrecognized command line option ‘-target’
gcc: error: unrecognized command line option ‘-target’
gcc: error: unrecognized command line option ‘-target’
gcc: error: unrecognized command line option ‘-fblocks’
gcc: error: unrecognized command line option ‘-fmodules’; did you mean ‘-fmudflap’?
gcc: error: unrecognized command line option ‘-fblocks’
gcc: error: unrecognized command line option ‘-fblocks’
gcc: error: unrecognized command line option ‘-fmodules’; did you mean ‘-fmudflap’?
gcc: error: unrecognized command line option ‘-target’
gcc: error: unrecognized command line option ‘-fmodules’; did you mean ‘-fmudflap’?
gcc: error: unrecognized command line option ‘-fmodules’; did you mean ‘-fmudflap’?
gcc: error: unrecognized command line option ‘-fblocks’
gcc: error: unrecognized command line option ‘-target’
gcc: error: unrecognized command line option ‘-fmodule-name=PerfectCZlib’
gcc: error: unrecognized command line option ‘-fmodules’; did you mean ‘-fmudflap’?
gcc: error: unrecognized command line option ‘-fmodules-cache-path=/home/dmi3y/Dev/Swift/PerfectTemplate/.build/x86_64-unknown-linux/debug/ModuleCache’
gcc: error: unrecognized command line option ‘-fblocks’
I'd appreciate any help with this as I'm pretty much new to nix-shell and NixOS.
EDIT:
I changed my shell.nix to this:
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
name = "swift-env";
buildInputs = with pkgs; [
openssl
clang
swift
];
shellHook = ''
CC=clang
'';
}
However, when I run nix-shell followed by swift build, I'm now getting:
[1/25] Compiling PerfectCZlib zutil.c
[2/25] Compiling PerfectCZlib uncompr.c
[3/25] Compiling PerfectCZlib inftrees.c
[4/25] Compiling PerfectCZlib inflate.c
[5/25] Compiling PerfectCZlib trees.c
[6/25] Compiling PerfectCZlib inffast.c
[7/25] Compiling PerfectCZlib infback.c
[8/25] Compiling PerfectCZlib gzwrite.c
/nix/store/iz6k7x3l14ykr56crz3dizas1rrkcyzr-clang-wrapper-7.1.0/resource-root/include/module.modulemap:24:8: error: redefinition of module '_Builtin_intrinsics'
# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
^
1 warning and 3 errors generated.
1 warning and 3 errors generated.
Full log can be found here.
This is now looks like a missing library dependency or a version conflict.
For the record, here's additional information about my setup that might shed more light:
$ nix-channel --list
home-manager https://github.com/rycee/home-manager/archive/master.tar.gz
nixos https://nixos.org/channels/nixos-19.09
$ nix-shell --run 'swift -version'
Swift version 5.0.2 (swift-5.0.2-RELEASE)
Target: x86_64-unknown-linux-gnub
After searching the web I found a Jira issue for Swift compiler and this specific comment. I decided to exclude clang from dependencies and only include swift, since this combination seem to be conflicting:
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
name = "swift-env";
buildInputs = with pkgs; [
openssl
swift
];
shellHook = ''
CC=clang
'';
}
And that worked! I was finally able to build the project!
Since your using the --pure option, nothing from your previous environment will be imported into the shell. This includes the swift binary itself. So first I would add swift to the buildInputs.
The error your getting indicates that gcc doesn't even understand the command line options being passed. I don't know anything about Swift, but after seeing that I assumed that it needs a different compiler. Sure enough, after a quick search it looks like it is llvm based. You will thus need to also add clang to your build inputs. In addition, you'll need to use mkShell instead of mkDerivation to setup the proper environment.
The former is a wrapper to the latter that is specifically designed to set up a nix-shell, and ensures the environment is handled correctly. You'll need to pass in the shellHook attribute to override the default c compiler to clang using the CC envvar. The shellHook is a way of running arbitrary commands at the start of the shell.
As a final note, the nix-shell command searches for shell.nix by default so you don't have to pass it as an argument. If shell.nix does not exist, then it will try default.nix. If neither exist, then you'll have to explicitly specify the nix expressions location.
TLDR
to put it all together:
# a more idiomatic way to import nixpkgs, overridable from the cmdline
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
name = "swift-env";
buildInputs = with pkgs; [
# your other inputs
clang
swift
];
shellHook = ''
CC=clang
'';
}
Just to be sure my logic was correct I downloaded the repo and gave it go. Everything compiles and runs successfully.

Compilation Error: libDAI-0.3.2 in Ubuntu 14.04 with MATLAB

I am trying to install libDAI-0.3.2 in Ubuntu 14.04. I need to use it with MATLAB.
I made following changes :
In Makefile.conf:
CC=g++-4.7
MEXFLAGS:=CXX=#$(CC) CXXFLAGS#'$(CCFLAGS)'
In Makefile.ALL: WITH_MATLAB=true
Since default compiler in Ubuntu 14.04 is gcc 4.8.4, I installed gcc-4.7 and g++4.7.
Still I get the following compilation error:
libDAI-0.3.2$ make
/usr/local/MATLAB/R2015a/bin/mex -Iinclude CXX= -largeArrayDims -lgmpxx -lgmp -output matlab/dai.mexa64 src/matlab/dai.cpp src/matlab/matlab.cpp src/graph.cpp src/dag.cpp src/bipgraph.cpp src/varset.cpp src/daialg.cpp src/alldai.cpp src/clustergraph.cpp src/factor.cpp src/factorgraph.cpp src/properties.cpp src/regiongraph.cpp src/cobwebgraph.cpp src/util.cpp src/weightedgraph.cpp src/exceptions.cpp src/exactinf.cpp src/evidence.cpp src/emalg.cpp src/io.cpp src/bp.cpp src/fbp.cpp src/trwbp.cpp src/mf.cpp src/hak.cpp src/lc.cpp src/treeep.cpp src/jtree.cpp src/mr.cpp src/gibbs.cpp src/bbp.cpp src/cbp.cpp src/bp_dual.cpp src/decmap.cpp src/glc.cpp
Building with 'g++'.
/tmp/mex_11282758003780_5023: -c: not found
make: *** [matlab/dai.mexa64] Error 255
what does this mean? Any idea how to fix this?
Thanks & Regards,
Swagatika
Try replacing
MEXFLAGS:=CXX=#$(CC) CXXFLAGS#'$(CCFLAGS)'
with
MEXFLAGS:=CXX=$(CC) CXXFLAGS='$(CCFLAGS)'
MEXFLAGS:=CXX=$(CC) CXXFLAGS='$(CCFLAGS)' replace this