Skip to content

Build fixes for codeQL #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ jobs:
name: Capture Environment

- run: |
tools/releaseBuild/vstsBuild.ps1 -Name 'centos.7' -Verbose
Import-Module ./build.psm1
Start-PSBootstrap
Start-BuildNativeUnixBinaries
name: Build

- name: Perform CodeQL Analysis
Expand Down
12 changes: 7 additions & 5 deletions build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,15 @@ function Get-EnvironmentInformation
$environment += @{'IsUbuntu16' = $Environment.IsUbuntu -and $LinuxInfo.VERSION_ID -match '16.04'}
$environment += @{'IsUbuntu17' = $Environment.IsUbuntu -and $LinuxInfo.VERSION_ID -match '17.10'}
$environment += @{'IsUbuntu18' = $Environment.IsUbuntu -and $LinuxInfo.VERSION_ID -match '18.04'}
$environment += @{'IsUbuntu22' = $Environment.IsUbuntu -and $LinuxInfo.VERSION_ID -match '22.04'}
$environment += @{'IsCentOS' = $LinuxInfo.ID -match 'centos' -and $LinuxInfo.VERSION_ID -match '7'}
$environment += @{'IsFedora' = $LinuxInfo.ID -match 'fedora' -and $LinuxInfo.VERSION_ID -ge 24}
$environment += @{'IsRedHat' = $LinuxInfo.ID -match 'rhel'}
$environment += @{'IsOpenSUSE' = $LinuxInfo.ID -match 'opensuse'}
$environment += @{'IsSLES' = $LinuxInfo.ID -match 'sles'}
$environment += @{'IsOpenSUSE13' = $Environmenst.IsOpenSUSE -and $LinuxInfo.VERSION_ID -match '13'}
$environment += @{'IsOpenSUSE42.1' = $Environment.IsOpenSUSE -and $LinuxInfo.VERSION_ID -match '42.1'}
$environment += @{'IsRedHatFamily' = $Environment.IsCentOS -or $Environment.IsFedora}
$environment += @{'IsRedHatFamily' = $Environment.IsCentOS -or $Environment.IsFedora -or $Environment.IsRedHat}
$environment += @{'IsSUSEFamily' = $Environment.IsSLES -or $Environment.IsOpenSUSE}
$environment += @{'IsAlpine' = $LinuxInfo.ID -match 'alpine'}

Expand Down Expand Up @@ -1891,7 +1893,7 @@ function Install-Dotnet {
}

function Get-RedHatPackageManager {
if ($Environment.IsCentOS) {
if ($Environment.IsCentOS -or $Environment.IsRedHat) {
"yum install -y -q"
} elseif ($Environment.IsFedora) {
"dnf install -y -q"
Expand Down Expand Up @@ -1978,13 +1980,13 @@ function Start-PSBootstrap {
}
} elseif ($Environment.IsRedHatFamily) {
# Build tools
$Deps += "which", "curl", "gcc-c++", "cmake", "make"
$Deps += "which", "curl", "wget"

# .NET Core required runtime libraries
$Deps += "libicu", "libunwind"
$Deps += "libicu", "openssl-libs"

# Packaging tools
if ($Package) { $Deps += "ruby-devel", "rpm-build", "groff", 'libffi-devel' }
if ($Package) { $Deps += "ruby-devel", "rpm-build", "groff", 'libffi-devel', "gcc-c++" }

$PackageManager = Get-RedHatPackageManager

Expand Down
6 changes: 3 additions & 3 deletions src/libpsl-native/gmock.pc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
libdir=/usr/local/lib
libdir=/usr/local/lib64
includedir=/usr/local/include

Name: gmock
Description: GoogleMock (without main() function)
Version: 1.9.0
URL: https://github.com/google/googletest
Libs: -L${libdir} -lgmock
Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=1
Libs: -L${libdir} -lgmock -pthread
Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=1 -pthread
6 changes: 3 additions & 3 deletions src/libpsl-native/gmock_main.pc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
libdir=/usr/local/lib
libdir=/usr/local/lib64
includedir=/usr/local/include

Name: gmock_main
Description: GoogleMock (with main() function)
Version: 1.9.0
URL: https://github.com/google/googletest
Libs: -L${libdir} -lgmock_main
Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=1
Libs: -L${libdir} -lgmock_main -pthread
Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=1 -pthread
6 changes: 3 additions & 3 deletions src/libpsl-native/gtest.pc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
libdir=/usr/local/lib
libdir=/usr/local/lib64
includedir=/usr/local/include

Name: gtest
Description: GoogleTest (without main() function)
Version: 1.9.0
URL: https://github.com/google/googletest
Libs: -L${libdir} -lgtest
Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=1
Libs: -L${libdir} -lgtest -pthread
Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=1 -pthread
6 changes: 3 additions & 3 deletions src/libpsl-native/gtest_main.pc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
libdir=/usr/local/lib
libdir=/usr/local/lib64
includedir=/usr/local/include

Name: gtest_main
Description: GoogleTest (with main() function)
Version: 1.9.0
URL: https://github.com/google/googletest
Requires: gtest
Libs: -L${libdir} -lgtest_main
Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=1
Libs: -L${libdir} -lgtest_main -pthread
Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=1 -pthread