Skip to content
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

Fix build error on Windows with HEAD #17

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
10 changes: 10 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ jobs:
ruby-version: '3.0'
- name: Run the default task
run: |
# Windows's cmake can't handle long path over 260 characters.
# It could not be avoided by CMAKE_OBJECT_PATH_MAX configuration.
# To avoid this, it copy the repository to short directry name.
Copy-Item -Path $PWD.Path -Destination /cm -Recurse
cd /cm

gem install bundler -v 2.2.26
ridk exec bundle install
ridk exec bundle exec rake

# Clean up
cd /
Remove-Item -Path /cm -Recurse -Force
2 changes: 1 addition & 1 deletion ci/apt-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ apt install -V -y lsb-release

apt install -V -y ruby-dev git build-essential pkg-config cmake
cd /cmetrics-ruby && \
gem install bundler --no-document && \
gem install bundler -v 2.4.22 --no-document && \
bundle install && \
bundle exec rake
4 changes: 2 additions & 2 deletions ci/yum-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ fi
if [ $USE_SCL -eq 1 ]; then
# For unbound variable error
export MANPATH=
cd /cmetrics-ruby && source /opt/rh/rh-ruby26/enable && gem install bundler --no-document && bundle install && bundle exec rake
cd /cmetrics-ruby && source /opt/rh/rh-ruby26/enable && gem install bundler -v 2.4.22 --no-document && bundle install && bundle exec rake
else
if [ $USE_AMZN_EXT -eq 1 ]; then
echo 'gem "io-console"' > /cmetrics-ruby/Gemfile.local
fi
cd /cmetrics-ruby && gem install bundler --no-document && bundle install && bundle exec rake
cd /cmetrics-ruby && gem install bundler -v 2.4.22 --no-document && bundle install && bundle exec rake
fi
7 changes: 7 additions & 0 deletions ext/cmetrics/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ def initialize(version=nil, fluent_otel_version= "0.9.0", cfl_version= "0.2.0",
@fluent_otel_version = fluent_otel_version
@cfl_version = cfl_version
@recipe = MiniPortileCMake.new("cmetrics", @version, **kwargs)

# To avoid "incompatible pointer type" error
def @recipe.cmake_compile_flags
flags = super
flags << "-DCMAKE_C_FLAGS='-Wno-incompatible-pointer-types'"
end

@checkpoint = ".#{@recipe.name}-#{@recipe.version}.installed"
@recipe.target = File.join(ROOT, "ports")
@recipe.files << {
Expand Down
Loading