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 windows cygwin #6267

Closed
wants to merge 3 commits into from
Closed

Fix build windows cygwin #6267

wants to merge 3 commits into from

Conversation

repocho
Copy link
Contributor

@repocho repocho commented Feb 16, 2016

Closes #6266

  • tasks/config/run.js -> The optimize step cmd now reflects the right path for each system.
  • tasks/config/archives.js -> Using tar from cygwin requires to use relative paths or full paths with unix format. I prefer to use relative paths than converting the paths from windows to unix format.
  • tasks/build/shasums.js -> Even if you have installed the command shasum in cygwin, executing from node returns an error. For windows the command is replaced by sha1sum that works perfectly.

This fixes the build of kibana only:
npm run build

and the cygwin should be installed and also all the packages used for the build. Usually the default ones plus zip, tar and shasum.

win-build-evidence2

@elasticsearch-release
Copy link

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'.

1 similar comment
@elasticsearch-release
Copy link

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'.

@rashidkpc
Copy link
Contributor

@BigFunger can you check this out when you get back from the all-hands?

@@ -4,6 +4,7 @@ module.exports = function (grunt) {
let {resolve} = require('path');
let root = p => resolve(__dirname, '../../', p);
let binScript = /^win/.test(platform) ? '.\\bin\\kibana.bat' : './bin/kibana';
let buildedBinScript = /^win/.test(platform) ? '.\\build\\kibana\\bin\\kibana.bat' : './build/kibana/bin/kibana';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename buildedBinScript to buildScript

@repocho
Copy link
Contributor Author

repocho commented Feb 25, 2016

Renamed ! Thanks for the feedback !

@epixa
Copy link
Contributor

epixa commented Feb 25, 2016

jenkins, test it


// kibana.zip
if (/windows/.test(platform.name)) {
await exec('zip', ['-rq', '-ll', platform.zipPath, platform.buildName]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What zip executable are you using? AFAIK there is no zip executable bundled with windows. So when I try to run the build process in your PR, I get an ENOENT error.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should build kibana using Cygwin. You must install all the packages used for the build (the default ones plus zip, tar and shasum).

@repocho
Copy link
Contributor Author

repocho commented Mar 7, 2016

@BigFunger Did you have time to check my last comment ?

@BigFunger
Copy link
Contributor

@repocho my apologies, I got pulled away from this.
You haven't been forgotten.
I was asked to see if I can get this to work with node modules instead of using an external dependency.

@johncst
Copy link

johncst commented Apr 5, 2016

Just did a fresh git, and tried to do a build. This is under Windows 10, which I know isn't supported for build, but I was asked to try it and post, so... The build got to the optimization step:

Running "clean:deepModules" (clean) task

6 paths cleaned.

Running "run:optimizeBuild" (run) task

Error: spawn ./build/kibana/bin/kibana ENOENT
Warning: non-zero exit code -4058 Use --force to continue.

Aborted due to warnings.

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "build"
npm ERR! node v4.4.2
npm ERR! npm v2.15.0
npm ERR! code ELIFECYCLE
npm ERR! kibana@5.0.0-snapshot build: grunt build
npm ERR! Exit status 3

From the log file:
6 info build kibana@5.0.0-snapshot
7 verbose unsafe-perm in lifecycle true
8 info kibana@5.0.0-snapshot Failed to exec build script
9 verbose stack Error: kibana@5.0.0-snapshot build: grunt build
9 verbose stack Exit status 3
9 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:217:16)
9 verbose stack at emitTwo (events.js:87:13)
9 verbose stack at EventEmitter.emit (events.js:172:7)
9 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
9 verbose stack at emitTwo (events.js:87:13)
9 verbose stack at ChildProcess.emit (events.js:172:7)
9 verbose stack at maybeClose (internal/child_process.js:827:16)
9 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
10 verbose pkgid kibana@5.0.0-snapshot
11 verbose cwd C:\Users\JohnC3\documents\jc3\kibana
12 error Windows_NT 10.0.10586
13 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "build"
14 error node v4.4.2
15 error npm v2.15.0
16 error code ELIFECYCLE

@LeeDr
Copy link

LeeDr commented May 4, 2016

FYI, I just got back on this so hopefully I'll make some headway.

@LeeDr
Copy link

LeeDr commented May 4, 2016

I had problems applying the patch (I'm not great at git) so instead I manually re-applied the changes to the 3 files exactly as in this PR to master. And it appears to have worked. It created the output archives but I HAVE NOT TESTED THEM YET to see if they're good.

@BigFunger - Is it required to "get this to work with node modules instead of using an external dependency" ?

Lee@LeeD-ASUS MINGW64 /c/git/kibana (master)
$ npm run build

> kibana@5.0.0-snapshot build C:\git\kibana
> grunt build

Running "build" task

Running "_build:getProps" task

Running "clean:build" (clean) task
>> 1 path cleaned.

Running "clean:target" (clean) task
>> 0 paths cleaned.

Running "_build:downloadNodeBuilds:start" task
>> windows exists
>> downloading linux-x64 - 11.25 mb
>> downloading linux-x86 - 10.85 mb
>> downloading darwin-x64 - 9.38 mb

Running "copy:devSource" (copy) task
Created 248 directories, copied 1088 files

Running "babel:build" (babel) task

Running "_build:babelOptions" task

Running "_build:installedPlugins" task

Running "_build:packageJson" task

Running "_build:readme" task

Running "_build:installNpmDeps" task

Running "_build:removePkgJsonDeps" task

Running "clean:testsFromModules" (clean) task
>> 2986 paths cleaned.

Running "clean:deepModuleBins" (clean) task
>> 1 path cleaned.

Running "clean:deepModules" (clean) task
>> 9 paths cleaned.

Running "run:optimizeBuild" (run) task

Running "stop:optimizeBuild" (stop) task
>> optimizeBuild stopped

Running "_build:downloadNodeBuilds:finish" task
>> linux-x64 download complete
>> linux-x86 download complete
>> darwin-x64 download complete

Running "_build:versionedLinks" task

Running "_build:osShellScripts" task

Running "_build:archives" task
 > tar -zchf ..\target\kibana-5.0.0-snapshot-darwin-x64.tar.gz kibana-5.0.0-snapshot-darwin-x64
 > tar -zchf ..\target\kibana-5.0.0-snapshot-linux-x64.tar.gz kibana-5.0.0-snapshot-linux-x64
 > tar -zchf ..\target\kibana-5.0.0-snapshot-linux-x86.tar.gz kibana-5.0.0-snapshot-linux-x86
 > tar -zchf ..\target\kibana-5.0.0-snapshot-windows.tar.gz kibana-5.0.0-snapshot-windows
 > zip -rq -ll ..\target\kibana-5.0.0-snapshot-windows.zip kibana-5.0.0-snapshot-windows
 > zip -rq ..\target\kibana-5.0.0-snapshot-linux-x86.zip kibana-5.0.0-snapshot-linux-x86
 > zip -rq ..\target\kibana-5.0.0-snapshot-linux-x64.zip kibana-5.0.0-snapshot-linux-x64
 > zip -rq ..\target\kibana-5.0.0-snapshot-darwin-x64.zip kibana-5.0.0-snapshot-darwin-x64

Running "_build:shasums" task

Done, without errors.

$ ls -l target
total 279964
-rw-r--r-- 1 Lee Lee 33280786 May  4 16:59 kibana-5.0.0-snapshot-darwin-x64.tar.gz
-rw-r--r-- 1 Lee Lee       82 May  4 16:59 kibana-5.0.0-snapshot-darwin-x64.tar.gz.sha1.txt
-rw-r--r-- 1 Lee Lee 41341975 May  4 16:59 kibana-5.0.0-snapshot-darwin-x64.zip
-rw-r--r-- 1 Lee Lee       79 May  4 16:59 kibana-5.0.0-snapshot-darwin-x64.zip.sha1.txt
-rw-r--r-- 1 Lee Lee 35213334 May  4 16:59 kibana-5.0.0-snapshot-linux-x64.tar.gz
-rw-r--r-- 1 Lee Lee       81 May  4 16:59 kibana-5.0.0-snapshot-linux-x64.tar.gz.sha1.txt
-rw-r--r-- 1 Lee Lee 43238441 May  4 16:59 kibana-5.0.0-snapshot-linux-x64.zip
-rw-r--r-- 1 Lee Lee       78 May  4 16:59 kibana-5.0.0-snapshot-linux-x64.zip.sha1.txt
-rw-r--r-- 1 Lee Lee 34749483 May  4 16:59 kibana-5.0.0-snapshot-linux-x86.tar.gz
-rw-r--r-- 1 Lee Lee       81 May  4 16:59 kibana-5.0.0-snapshot-linux-x86.tar.gz.sha1.txt
-rw-r--r-- 1 Lee Lee 42778171 May  4 16:59 kibana-5.0.0-snapshot-linux-x86.zip
-rw-r--r-- 1 Lee Lee       78 May  4 16:59 kibana-5.0.0-snapshot-linux-x86.zip.sha1.txt
-rw-r--r-- 1 Lee Lee 24764041 May  4 16:58 kibana-5.0.0-snapshot-windows.tar.gz
-rw-r--r-- 1 Lee Lee       79 May  4 16:59 kibana-5.0.0-snapshot-windows.tar.gz.sha1.txt
-rw-r--r-- 1 Lee Lee 31291185 May  4 16:59 kibana-5.0.0-snapshot-windows.zip
-rw-r--r-- 1 Lee Lee       76 May  4 16:59 kibana-5.0.0-snapshot-windows.zip.sha1.txt

@LeeDr
Copy link

LeeDr commented May 4, 2016

Hmm, when I unzipped the kibana-5.0.0-snapshot-windows.zip on my Windows 10 laptop it unzipped OK, but when I tried to start Kibana I got a Windows pop-up that said

This app can't run on your PC
To find a version for your PC, check with the software publisher

I think this is related to the node.exe it included in the zip. This one is much smaller (and might be 16 or 32 bit);

-rwxr-xr-x 1 Lee Lee 3292182 May  4 16:49 /d/kMasterPR6267/kibana-5.0.0-snapshot-windows/node/node.exe*

than this one (which must be 32 or 64 bit);

-rwxr-xr-x 1 Lee Lee 11682968 Apr 29 17:39 /d/k5.0-a2/kibana-5.0.0-alpha2-rc2-windows/node/node.exe*

@LeeDr
Copy link

LeeDr commented May 5, 2016

While I technically never got the whole build on Windows/cygwin to work from scratch, once I manually downloaded the node.exe binary and put it in .node_binaries/4.3.2/windows/, the rest of the build and archiving all worked.
I only tested the kibana-5.0.0-snapshot-windows.zip, and the kibana-5.0.0-snapshot-linux-x64.tar.gz.

@LeeDr
Copy link

LeeDr commented May 5, 2016

LGTM. I also added a note to CONTRIBUTING.md about the Cygwin packages. I'm using this PR to merge to master; #7141

@LeeDr LeeDr closed this May 5, 2016
@khelmrab
Copy link

hello, @johncst have you found a solution to build kibana in windows 10 ?
thank's

jbudz pushed a commit that referenced this pull request Nov 18, 2022
## Summary
`eui@67.1.8` ⏩ `eui@70.2.2`

⚠️ Note: This upgrade contains breaking changes to `EuiFlexGroup` and
`EuiFlexGrid`, primarily around switching margins and negative margins
to `gap`. Please do a quick QA pass of your app to scan for any issues.
We're happy to help resolve minor fixes, or potentially follow up after
PR merges. You can find us over in #eui!

## [`70.2.4`](https://github.com/elastic/eui/tree/v70.2.4)

**Bug fixes**

- Fixed visual bug in nested `EuiFlexGroup`s, where the parent
`EuiFlexGroup` is responsive but a child `EuiFlexGroup` is not
([#6381](elastic/eui#6381))

## [`70.2.3`](https://github.com/elastic/eui/tree/v70.2.3)

**Bug fixes**

- Fixed incorrect margins in `EuiSuperDatePicker` caused by `EuiFlex`
CSS gap change ([#6380](elastic/eui#6380))

## [`70.2.2`](https://github.com/elastic/eui/tree/v70.2.2)

- `EuiButton` now accepts `minWidth={false}`
([#6373](elastic/eui#6373))

**Bug fixes**

- `EuiButton` no longer outputs unnecessary inline styles for
`minWidth={0}` or `minWidth={false}`
([#6373](elastic/eui#6373))
- `EuiFacetButton` no longer reports type issues when passing props
accepted by `EuiButton`
([#6373](elastic/eui#6373))
- Fixed the shadow sizes of `.eui-yScrollWithShadows` and
`.eui-xScrollWithShadows`
([#6374](elastic/eui#6374))


## [`70.2.1`](https://github.com/elastic/eui/tree/v70.2.1)

**Bug fixes**

- Re-fixed `EuiPageSection` not correctly merging `contentProps.css`
([#6365](elastic/eui#6365))
- Fixed `EuiTab` not defaulting to size `m`
([#6366](elastic/eui#6366))

## [`70.2.0`](https://github.com/elastic/eui/tree/v70.2.0)

- Added a keyboard shortcuts popover to `EuiDataGrid`'s toolbar. This
can be visually hidden via `toolbarVisibility.showKeyboardShortcuts`,
but will always remain accessible to keyboard and screen reader users.
([#6036](elastic/eui#6036))
- `EuiScreenReaderOnly`'s `showOnFocus` prop now also shows on focus
within its children ([#6036](elastic/eui#6036))
- Added `onFocus` prop callback to `EuiSuperDatePicker`
([#6320](elastic/eui#6320))

**Bug fixes**

- Fixed `EuiSelectable` to ensure the full options list is re-displayed
when the search bar is controlled and cleared using `searchProps.value`
([#6317](elastic/eui#6317))
- Fixed incorrect padding on `xl`-sized `EuiTabs`
([#6336](elastic/eui#6336))
- Fixed `EuiCard` not correctly merging `css` on its child `icon`s
([#6341](elastic/eui#6341))
- Fixed `EuiCheckableCard` not setting `css` on the correct DOM node
([#6341](elastic/eui#6341))
- Fixed a webkit rendering issue with `EuiModal`s containing
`EuiBasicTable`s tall enough to scroll
([#6343](elastic/eui#6343))
- Fixed bug in `to_initials` that truncates custom initials
([#6346](elastic/eui#6346))
- Fix bug in `EuiCard` where layout breaks when `horizontal` and
`selectable` are both passed
([#6348](elastic/eui#6348))

## [`70.1.0`](https://github.com/elastic/eui/tree/v70.1.0)

- Added the `hint` prop to the `<EuiSearchBar />`. This prop lets the
consumer render a hint below the search bar that will be displayed on
focus. ([#6319](elastic/eui#6319))
- Added the `hasDragDrop` prop to `EuiPopover`. Use this prop if your
popover contains `EuiDragDropContext`.
([#6329](elastic/eui#6329))

**Bug fixes**

- Fixed `EuiButton`'s cursor style when the button is disabled
([#6323](elastic/eui#6323))
- Fixed `EuiPageTemplate` not recognizing child
`EuiPageSidebar`s/`EuiPageTemplate.Sidebar`s with `css` props
([#6324](elastic/eui#6324))
- Fixed `EuiBetaBadge` to always respect its `anchorProps` values,
including when there is no tooltip content
([#6326](elastic/eui#6326))
- Temporarily patched `EuiModal` to not cause scroll-jumping issues on
modal open ([#6327](elastic/eui#6327))
- Fixed buggy drag & drop behavior within `EuiDataGrid`'s columns &
sorting toolbar popovers
([#6329](elastic/eui#6329))
- Fixed `EuiButton` not correctly passing `textProps` for children
inside fragments or i18n components
([#6332](elastic/eui#6332))
- Fixed `EuiButton` not correctly respecting `minWidth={0}`
([#6332](elastic/eui#6332))

**CSS-in-JS conversions**

- Converted `EuiTabs` to Emotion
([#6311](elastic/eui#6311))

## [`70.0.0`](https://github.com/elastic/eui/tree/v70.0.0)

- Added the `enabled` option to the `<EuiInMemoryTable />`
`executeQueryOptions` prop. This option prevents the Query from being
executed when controlled by the consumer.
([#6284](elastic/eui#6284))

**Bug fixes**

- Fixed `EuiOverlayMask` to set a
`[data-relative-to-header=above|below]` attribute to replace the
`--aboveHeader` and `--belowHeader` classNames removed in its Emotion
conversion ([#6289](elastic/eui#6289))
- Fixed `EuiHeader` CSS using removed `EuiOverlayMask` class modifiers
([#6293](elastic/eui#6293))
- Fixed `EuiToolTip` not respecting reduced motion preferences
([#6295](elastic/eui#6295))
- Fixed a bug with `EuiTour` where passing any `panelProps` would cause
the beacon to disappear
([#6298](elastic/eui#6298))

**Breaking changes**

- `@emotion/css` is now a required peer dependency, alongside
`@emotion/react` ([#6288](elastic/eui#6288))
- `@emotion/cache` is no longer required peer dependency, although your
project must still use it if setting custom cache/injection locations
([#6288](elastic/eui#6288))

**CSS-in-JS conversions**

- Converted `EuiCode` and `EuiCodeBlock` to Emotion; Removed
`euiCodeSyntaxTokens` Sass mixin and `$euiCodeBlockPaddingModifiers`;
([#6263](elastic/eui#6263))
- Converted `EuiResizableContainer` and `EuiResizablePanel` to Emotion
([#6287](elastic/eui#6287))

## [`69.0.0`](https://github.com/elastic/eui/tree/v69.0.0)

- Added support for `fullWidth` prop on EuiForm, which will be the
default for all rows/controls within
([#6229](elastic/eui#6229))
- Added support for `onResizeStart` and `onResizeEnd` callbacks to
`EuiResizableContainer`
([#6236](elastic/eui#6236))
- Added optional case sensitive option matching to `EuiComboBox` with
the `isCaseSensitive` prop
([#6268](elastic/eui#6268))
- `EuiFlexItem` now supports `grow={0}`
([#6270](elastic/eui#6270))
- Added the `alignItems` prop to `EuiFlexGrid`
([#6281](elastic/eui#6281))
- Added `filter`, `filterExclude`, `filterIgnore`, `filterInclude`,
`indexTemporary`, `infinity`, `sortAscending`, and `sortDescending`
glyphs to `EuiIcon` ([#6282](elastic/eui#6282))

**Bug fixes**

- Fixed `EuiTextProps` to show the `color` type option `inherit` as
default ([#6267](elastic/eui#6267))
- `EuiFlexGroup` now correctly respects `gutterSize` when responsive
([#6270](elastic/eui#6270))
- Fixed the last breadcrumb in `EuiBreadcrumbs`'s `breadcrumbs` array
not respecting `truncate` overrides
([#6280](elastic/eui#6280))

**Breaking changes**

- `EuiFlexGrid` no longer supports `columns={0}`. Use `EuiFlexGroup`
instead for normal flex display
([#6270](elastic/eui#6270))
- `EuiFlexGrid` now uses modern `display: grid` CSS
([#6270](elastic/eui#6270))
- `EuiFlexGroup`, `EuiFlexGrid`, and `EuiFlexItem` now use modern `gap`
CSS instead of margins and negative margins
([#6270](elastic/eui#6270))
- `EuiFlexGroup` no longer applies responsive styles to `column` or
`columnReverse` directions
([#6270](elastic/eui#6270))

**CSS-in-JS conversions**

- Converted `EuiFlexGroup`, `EuiFlexGrid`, and `EuiFlexItem` to Emotion
([#6270](elastic/eui#6270))

## [`68.0.0`](https://github.com/elastic/eui/tree/v68.0.0)

- Added `beta` glyph to `EuiIcon`
([#6250](elastic/eui#6250))
- Added `launch` and `spaces` glyphs to `EuiIcon`
([#6260](elastic/eui#6260))
- Added the `fallbackDestination` prop to `EuiSkipLink`, which accepts a
string of query selectors to fall back to if the `destinationId` does
not have a valid target. Defaults to `main`
([#6261](elastic/eui#6261))
- `EuiSkipLink` is now always an `a` tag to ensure that it is always
placed within screen reader link menus.
([#6261](elastic/eui#6261))

**Bug fixes**

- Fixed `EuiSuperDatePicker` not correctly merging passed `className`s
([#6253](elastic/eui#6253))
- Fixed `EuiColorStops` not correctly merging in passed
`data-test-subj`s, `style`s, or `...rest`
([#6255](elastic/eui#6255))
- Fixed `EuiResizablePanel` incorrectly passing `style` to the wrapper
instead of the panel. Use `wrapperProps.style` to pass styles to the
wrapper. ([#6255](elastic/eui#6255))
- Fixed custom `onClick`s passed to `EuiSkipLink` overriding
`overrideLinkBehavior`
([#6261](elastic/eui#6261))

**Breaking changes**

- Removed `inherit` and `ghost` color from `EuiListGroupItem`
([#6207](elastic/eui#6207))
- Changed default color to `text` instead of `inherit`
([#6207](elastic/eui#6207))

**CSS-in-JS conversions**

- Converted `EuiListGroup` and `EuiListGroupItem` to Emotion; Removed
`$euiListGroupGutterTypes`, `$euiListGroupItemColorTypes` and
`$euiListGroupItemSizeTypes`;
([#6207](elastic/eui#6207))
- Converted `EuiBadgeGroup` to Emotion
([#6258](elastic/eui#6258))
- Converted `EuiBetaBadge` to Emotion
([#6258](elastic/eui#6258))
- Converted `EuiNotificationBadge` to Emotion
([#6258](elastic/eui#6258))

Co-authored-by: Elizabet Oliveira <elizabet.oliveira@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build system doesn't work with Windows OS (cygwin)
8 participants