Coder Social home page Coder Social logo

Building simulator on W10 about epsilon HOT 4 CLOSED

amidarius avatar amidarius commented on June 28, 2024 2
Building simulator on W10

from epsilon.

Comments (4)

MarcNumworks avatar MarcNumworks commented on June 28, 2024

Thank you for your issue, amidarius, we have made some modifications similar to what you did in the version 22 which was just released.
The Windows build and CI should be working now.
Building a custom userland for the device (with arm-none-eabi-gcc installed via msys) should work out of the box too.

from epsilon.

ljoets avatar ljoets commented on June 28, 2024

Hi,

Thanks @amidarius for your notes !

Just one thing : I needed to type export SETUPTOOLS_USE_DISTUTILS=stdlib (without the set) before pip3 install lz4 pypng stringcase. @MarcNumworks : Is it possible to add this line on the https://www.numworks.com/engineering/software/build/ page ?

So I can now build epsilon.exe, but I noticed several warnings during windows compilation :

CXX     apps/regression/model/trigonometric_model.o
apps/regression/model/trigonometric_model.cpp: In member function 'virtual void Regression::TrigonometricModel::specializedInitCoefficientsForFit(double*, double, Regression::Store*, int) const':
apps/regression/model/trigonometric_model.cpp:194:34: warning: 'xMin' may be used uninitialized [-Wmaybe-uninitialized]
  194 |   double period = 2.0 * std::fabs(xMax - xMin);
      |                         ~~~~~~~~~^~~~~~~~~~~~~
apps/regression/model/trigonometric_model.cpp:187:10: note: 'xMin' was declared here
  187 |   double xMin, xMax, yMin, yMax;
      |          ^~~~
apps/regression/model/trigonometric_model.cpp:194:34: warning: 'xMax' may be used uninitialized [-Wmaybe-uninitialized]
  194 |   double period = 2.0 * std::fabs(xMax - xMin);
      |                         ~~~~~~~~~^~~~~~~~~~~~~
apps/regression/model/trigonometric_model.cpp:187:16: note: 'xMax' was declared here
  187 |   double xMin, xMax, yMin, yMax;
      |                ^~~~
apps/regression/model/trigonometric_model.cpp:190:32: warning: 'yMin' may be used uninitialized [-Wmaybe-uninitialized]
  190 |   modelCoefficients[0] = (yMax - yMin) / 2.0;
      |                          ~~~~~~^~~~~~~
apps/regression/model/trigonometric_model.cpp:187:22: note: 'yMin' was declared here
  187 |   double xMin, xMax, yMin, yMax;
      |                      ^~~~
apps/regression/model/trigonometric_model.cpp:190:32: warning: 'yMax' may be used uninitialized [-Wmaybe-uninitialized]
  190 |   modelCoefficients[0] = (yMax - yMin) / 2.0;
      |                          ~~~~~~^~~~~~~
apps/regression/model/trigonometric_model.cpp:187:28: note: 'yMax' was declared here
  187 |   double xMin, xMax, yMin, yMax;
      |                            ^~~~
CXX     eadk/src/simulator.o
eadk/src/simulator.cpp: In function 'KDPoint p(eadk_point_t)':
eadk/src/simulator.cpp:50:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   50 |   return *reinterpret_cast<KDPoint *>(&point);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eadk/src/simulator.cpp:50:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
eadk/src/simulator.cpp: In function 'KDRect r(eadk_rect_t)':
eadk/src/simulator.cpp:55:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   55 |   return *reinterpret_cast<KDRect *>(&rect);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eadk/src/simulator.cpp:55:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
eadk/src/simulator.cpp: At global scope:
eadk/src/simulator.cpp:95:15: warning: 'eadk_external_data_size' initialized and declared 'extern'
   95 | extern size_t eadk_external_data_size = 0;
      |               ^~~~~~~~~~~~~~~~~~~~~~~
CXX     poincare/src/list.o
poincare/src/list.cpp: In member function 'Poincare::Expression Poincare::List::approximateAndRemoveUndefAndSort(const Poincare::ApproximationContext&) const [with T = float]':
poincare/src/list.cpp:233:42: warning: array subscript -4 is outside array bounds of 'Poincare::Evaluation<float> [1]' [-Warray-bounds=]
  233 |   static_cast<ListComplex<T>&>(eval).sort();
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
poincare/src/list.cpp:228:17: note: at offset -8 into object 'eval' of size 2
  228 |   Evaluation<T> eval =
      |                 ^~~~
poincare/src/list.cpp: In member function 'Poincare::Expression Poincare::List::approximateAndRemoveUndefAndSort(const Poincare::ApproximationContext&) const [with T = double]':
poincare/src/list.cpp:233:42: warning: array subscript -4 is outside array bounds of 'Poincare::Evaluation<double> [1]' [-Warray-bounds=]
  233 |   static_cast<ListComplex<T>&>(eval).sort();
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
poincare/src/list.cpp:228:17: note: at offset -8 into object 'eval' of size 2
  228 |   Evaluation<T> eval =
      |                 ^~~~
CXX     poincare/src/list_sort.o
poincare/src/list_sort.cpp: In member function 'Poincare::Expression Poincare::ListSort::shallowReduce(Poincare::ReductionContext)':
poincare/src/list_sort.cpp:73:27: warning: array subscript -4 is outside array bounds of 'Poincare::Evaluation<float> [1]' [-Warray-bounds=]
   73 |       listOfDefinedScalars};
      |                           ^
poincare/src/list_sort.cpp:63:21: note: at offset -8 into object 'approximatedList' of size 2
   63 |   Evaluation<float> approximatedList =
      |                     ^~~~~~~~~~~~~~~~
CC      python/port/stackctrl.o
python/port/stackctrl.c: In function 'mp_stack_ctrl_init':
python/port/stackctrl.c:36:32: warning: storing the address of local variable 'stack_dummy' in 'mp_state_ctx.thread.stack_top' [-Wdangling-pointer=]
   36 |     MP_STATE_THREAD(stack_top) = (char*)&stack_dummy;
python/port/stackctrl.c:35:18: note: 'stack_dummy' declared here
   35 |     volatile int stack_dummy;
      |                  ^~~~~~~~~~~
In file included from python/port/stackctrl.c:27:
python/src/py/mpstate.h:287:23: note: 'mp_state_ctx' declared here
  287 | extern mp_state_ctx_t mp_state_ctx;
      |                       ^~~~~~~~~~~~

from epsilon.

MarcNumworks avatar MarcNumworks commented on June 28, 2024

Hi @ljoets,

Thanks for reporting these warnings, they don’t appear with clang or arm gcc but indeed they also appear with gcc on linux, we will fix them.

I have added your question in an internal issue where we want to improve this tutorial, I hope we will have time for this soon.

Have a nice day !

from epsilon.

ljoets avatar ljoets commented on June 28, 2024

Here the warnings when actually building on Debian 12 :

XX     poincare/src/list.o
poincare/src/list.cpp: In member function ‘Poincare::Expression Poincare::List::approximateAndRemoveUndefAndSort(const Poincare::ApproximationContext&) const [with T = float]’:
poincare/src/list.cpp:233:42: warning: array subscript -4 is outside array bounds of ‘Poincare::Evaluation<float> [1]’ [-Warray-bounds]
  233 |   static_cast<ListComplex<T>&>(eval).sort();
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
poincare/src/list.cpp:228:17: note: at offset -8 into object ‘eval’ of size 2
  228 |   Evaluation<T> eval =
      |                 ^~~~
poincare/src/list.cpp: In member function ‘Poincare::Expression Poincare::List::approximateAndRemoveUndefAndSort(const Poincare::ApproximationContext&) const [with T = double]’:
poincare/src/list.cpp:233:42: warning: array subscript -4 is outside array bounds of ‘Poincare::Evaluation<double> [1]’ [-Warray-bounds]
  233 |   static_cast<ListComplex<T>&>(eval).sort();
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
poincare/src/list.cpp:228:17: note: at offset -8 into object ‘eval’ of size 2
  228 |   Evaluation<T> eval =
      |                 ^~~~
CXX     poincare/src/list_sort.o
poincare/src/list_sort.cpp: In member function ‘Poincare::Expression Poincare::ListSort::shallowReduce(Poincare::ReductionContext)’:
poincare/src/list_sort.cpp:73:27: warning: array subscript -4 is outside array bounds of ‘Poincare::Evaluation<float> [1]’ [-Warray-bounds]
   73 |       listOfDefinedScalars};
      |                           ^
poincare/src/list_sort.cpp:63:21: note: at offset -8 into object ‘approximatedList’ of size 2
   63 |   Evaluation<float> approximatedList =
      |                     ^~~~~~~~~~~~~~~~
LD      epsilon.bin
/usr/bin/ld: attention: output/release/simulator/linux/ion/src/simulator/shared/collect_registers_x86_64.o: l'absence de la section .note.GNU-stack implique une pile exécutable
/usr/bin/ld: NOTE: Ce comportement est déprécié et sera supprimé dans une version ultérieure de l'éditeur de liens

The build bin file works fine.

from epsilon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.